As I understand, in addition to having to pay income tax on gains, early withdrawals from a 401(k) also incur a penalty. But, I also heard that there are exceptions to the penalty, e.g. if paying educational expenses. If this is true, though, then for example, why wouldn't I maximize my contribution as much as my company's willing to match, given that I could withdraw that amount immediately with no penalties? In other words, what stops me from increasing my contribution given that an exception would allow me to withdraw that increase plus a matched amount, right away?
Have I been misinformed about exceptions? Or, am I misunderstanding how matching works, e.g. does the company match only once a year in lump? (But even then, it seems possible to take advantage.) Or, am I misunderstanding how withdrawing works, e.g. is there a limit to the frequency of withdrawing? (Ditto—I still see an advantage.)
From page 34 of Publication 575:
Exceptions to tax. Certain early distributions are excepted from the early distribution tax. If the payer knows that an exception applies to your early distribution, distribution code “2,” “3,” or “4” should be shown in box 7 of your Form 1099-R and you do not have to report the distribution on Form 5329.
From page 3 of Publication 970:
Take early distributions from any type of individual retirement arrangement (IRA) for education costs without paying the 10% additional tax on early distributions;