The reality behind it is that 401k administration is a heavy and expensive process and the reason it's all pooled together at one provider is that. Obviously once you're done, you can take it anywhere into an IRA.
It's not just the rollovers when you switch jobs. It's also being locked into whatever funds (and fees) the plan your company selected offers. Especially given you can go standup a full 401k for yourself if you are self employed for free (at Fidelity amongst other places).
For HSA, you can do a variation of that: open a separate HSA anywhere you want and set up recurring monthly trustee-to-trustee (i.e. direct) transfers of your payroll contributions plus any employer contributions from one HSA to the other. This can all happen while you're employed.
You still need to make sure to adjust the transfer amounts any time you or your employer contributes less to the employer-affiliated HSA, generally avoid overdrawing either account, and make sure to count your contributions only once per year at tax time. But there are no other downsides.
I thought they were criminals for going to lump sum match. This is net level stuff...
But look at Calpers. They have $500 billion in management and an annual budget of $2.5 billion. That's a huge amount just to run the damn thing.
And then they go and invest in private equity, hedge funds, and VC funds, all charging their variation of 2/20 on top of everything.
401ks and pensions are ultimately invested in the same thing. The equity and debt of businesses. But 401ks have much lower fees.