It is worth recognizing though that not all employed people get medical benefits. Indeed many minimum wage jobs, low income jobs, "casual" jobs etc come with no medical benefits.
It's also worth noting that I some states it's OK to get fired for being sick. At which point you may lose those benefits.
Plus in poor economic times (like being a federal worker right now) losing your medical because you lost your job, seems like a suboptimal outcome.
But I agree with your last statement, this system works just fine, for a large enough group, so there's little political incentive to change it.
The same as any fancy restaurant meal is free: They gonna bill ya later