The employer match is the part that matters
A 401(k) grows from three inputs: what you contribute, what your employer adds, and what the balance earns. Of the three, the match is the only one offering a guaranteed immediate return. A typical arrangement — the employer matching 50% of contributions up to 6% of salary — pays 50 cents on every dollar the moment it lands. No investment reliably returns 50% in a year. Contributing less than the full match is the one clearly avoidable mistake in retirement saving.
Vesting decides whether that money is actually yours. Your own contributions always are, but employer money often vests on a schedule — commonly graded over three to five years, or all at once via a cliff. Leaving before you vest forfeits the unvested portion, which is worth checking against the timing of a job move.