Even when they are generous, for current spending (money raised and spent in the same year) it doesn't seem like a long-term problem, because they can cut back later. There's even a sense in which spare capacity in good times makes it easier to find low-priority items to cut back on. If everything is already high-priority, what do you do?
But where the cost is locked in, far in the future, and variable, city governments are clearly not good at planning ahead. I'm in favor of generous retirement benefits, but using a 401k-like plan where all costs to the city are up front. Most newer businesses moved to that long ago.