I will use generalities here. A large part of the problem was that cronies were placed in positions that were in charge of those retirement funds. They played with other people’s lives and invested in junk bonds and high risk stocks. The cronies left town with their pot of gold before things went south.
( John Corzine types)
I saw an interesting 60 Minutes episode about 25 years ago about this very subject. I don't know why I have always remembered it, other than how outrageous it was. The subject was how cities and counties are vastly over-promising pensions to new hires. The journalist interviewed various hiring managers in different cities, and asked them why they were giving such lavish benefits. "Because we want the best people. If we don't offer these benefits, they'll just go down the road to the next town." The interviewer asked, "But your own figures show you will go bankrupt if you have to pay these pensions." The answer, "Yes, but everyone is offering them, and I will be retired by then."
Well, the future is now. They never fixed the problem, and now that these people are starting to retire, the cities will go bankrupt.