The real cost of those benefits decades into the future aren’t properly reflected in government budgets. It allows politicians to promise lavish benefits who need the votes from the government employee unions, and then the costs get understated, or just straight up ignored since who is going to force the government to set aside money for the future? End result is people today paying for labor performed decades ago, and not allowing for proper pricing of government labor compared to private sector.
For proof, check your local and state government pension plans reports. And note that those numbers are optimistic by at least 30% (compared to how the government forces private employers to value defined benefit pension liabilities).