This question already has an answer here:
My company offers a 401k 50% match up to 6% of salary, but I'm restricted to picking one of a set of investment portfolios.
My thinking is, could I max out the 6% every year, get the full 50% match, and then withdraw at the end of each year for the 10% penalty? Given a 50k salary, that would be 3k that I'd invest, 1.5k match = 4.5k total, and the 10% penalty would still give me 4.05k, or a 35% yearly return that I could immediately move to my regular investment account with full flexibility.
Good idea, bad idea? What am I missing?