You're absolutely right!
A well-executed, professionally administered, and properly run defined benefit pension system is by far superior to every other option on offer. It offers predictable costs for the employer, predictable benefits for the employer, and all of this will continue without the company for as long as the pensioner lives.
In practice, there's been a lot of subtlety to this. It's very easy to make changes with low-visibility long-term negative impacts and high-visibility short-term positive impacts. Public-sector pensions in the US have famously assumed unrealistically high discount rates, among other things, because that turns into small contributions in the short term which employees and unions love.
Decades down the line, everyone gets screwed. But the people who made the bad decisions are well beyond accountability at that point. Since they know this, everyone involved is incentivized to think short-term. Never mind the issues that arise when life expectencies increase well beyond what pension fund planners knew to work with.
The popular workaround for this is a 401k or similar. This isn't ideal by any means. It takes away the defined benefits and the predictability and certainty for pensioners! The main upside is that it also removes the kind of misaligned incentives that can encourage poor decision-making and provides more assurance that something will be there later in life.
You're completely right. Pensions, when done properly, are amazing for everyone! The alternatives kinda suck by comparison. But they're much better than the answer many pension funds have provided.
(Salaries, being compensation for a defined term as well as defined amount, can be terminated, and are also compared to current value provided. And aren't assumed to generally last until employee death.)