One of my mothers friends, who is now in her 80's, has been retired on a pension for over 40 years. She started working for her municipality right out of high school at 18, and worked 25 years as a clerk to get a full pension. Retired at 43(!) with 75% final pay (annually adjusted) and lifelong medical benefits.
Its totally insane and completely unsustainable. Back in the day people usually keeled over at 65 and the US was viewed as having achieved infinite growth forever, so perhaps back then it was a reasonable but generous offer. Today however it's just straight up corruption and waste to offer benefits like that.
No, it was a trade. You would accept low pay, very little opportunity for career advancement, and even if you worked hard to advance you were never going to more than double what you were making when you were hired. Also, government jobs are political jobs, are often eliminated on a whim, or you're forced to work unpaid for a while because of a budget vote.
In return, you got a pension. A pension that everyone understood the yield of, and everybody understood about what it was worth. It was entirely sustainable. The problem was and is that invested pension funds become underfunded because if instead of depositing the money, you spend it somewhere else and promise to put it back later, it's basically a low-interest loan. If the budget is tight enough (so credit is probably bad enough) that a state or municipality is considering raiding pensions, then this represents a huge amount of savings. The problem is that you're never going to pay it back.
Another problem is that managing those funds became lucrative for the managers, and for the products that they would steer these institutions into buying, often in exchange for kickbacks or in a complex web of self-dealing: Somehow, the person managing pensions funds for your state has them all invested in products sold by a company his son works for. His son didn't directly profit from the trade, but for some reason makes $500K a year, barely graduated high school, and nobody knows what he actually does there.
That's not the fault of pensions, that's the fault of thieves. What's unsustainable is a government that promises a pension in return for a shitty boring career as a clerk, and then after you retire from sitting in a DMV window for 25 years, takes the pension back. Nobody would accept a government job cheaply then, because the state has ruined its reputation in the same way as if they had defaulted on their bonds.
Nothing wrong if that's how we want to pay government employees: a days work for a days pay. But we got a discount because we didn't pay like that, and if we had, that money would just have been spent at the time, rather than being stolen throughout their retirement. Pretending like pensions were an unreasonable demand or an absurd promise is just laying groundwork to justify stealing from people who worked for a living.
edit: If government jobs were so good, why weren't they in demand? Does supply and demand only break down when we need it to?