The main reason why so many state and local governments are bankrupt, or on the verge of bankruptcy, is the combination of government-run monopolies and government-employee unions. Government-employee unions have vastly more power than do private-sector unions because the entities they work for are typically monopolies.
When the employees of a grocery store, for example, go on strike and shut down the store, consumers can simply shop elsewhere, and the grocery-store management is perfectly free to hire replacement workers. In contrast, when a city teachers' or garbage-truck drivers' union goes on strike, there is no school and no garbage collection as long as the strike goes on. In addition, teachers' tenure (typically after two or three years in government schools) and civil-service regulations make it extremely costly if not virtually impossible to hire replacement workers.
Thus, when government bureaucrats go on strike they have the ability to completely shut down the entire "industry" they "work" in indefinitely. The taxpayers will complain bitterly about the absence of schools and garbage collection, forcing the mayor, governor, or city councillors to quickly cave in to the union's demands to avoid risking the loss of their own jobs due to voter dissatisfaction. This process is the primary reason why, in general, the expenses of state and local governments have skyrocketed year in and year out, while the "production" of government employees declines.
Every government-employee union is a political machine that lobbies relentlessly for higher taxes, increased government spending, more featherbedding, and more pension promises – while demonizing hesitant taxpayers as uncaring enemies of children, the elderly, and the poor (who are purportedly "served" by the government bureaucrats the unions represent).