UA didn't fund the pension plan, then declared bankruptcy in 2005 primarily to get the $10B pension off it's books.
Now that UA is profitable again, it's under no obligation to fund the pension plan it discharged from it's 2005 bankruptcy.
https://www.pbgc.gov/wr/large/united/united-airlines-plan-re...
A 401(k) is theoretically better because you can pass the unspent amount to your heirs.
(I make this post to point out that it’s a tradeoff, not that one is dominant over the other for all people/situations.)
This is generally the popular move because pensions plans create huge liabilities over time because you’re promising a final outcome rather than a promised level of funding.
A ton of companies moved away from defined benefit plans. There's still on the hook (in general) for existing obligations; they can't just go "never mind" for the most part. They've just focused on different retirement benefits going forward.
They can’t “take it away”. They just ran out of money with the judge ruling that shareholders don’t get priority access to what’s left.