However, municipalities aren't like other governments. They aren't sovereign in the same way as countries, or states (or, in the case of Canada, provinces). They generally derive their authority from the state government; perhaps through a special charter. Whether or not that distinction matters in this case; I don't know — but, it is generally an important distinction.
Also, one of the few, universally acknowledged, functions of government; is the enforcement of contracts. If governments void contracts with impunity; what does that do to their moral authority to enforce other contracts?
You might find the writings of Hans Herman Hoppe interesting. That is his favorite topic. Governments claim the sole authority to settle disputes, so naturally they usually decide disputes involving themselves in their own favor. In fact, governments will often creates disputes, just so they can rule in their own favor.
Private companies deal with governmental entities because they think it is easy money. But smart businessmen also know that there is always a risk in dealing with governmental entities. I worked in the university accounting department when I was in college and we had vendors who were outraged to find out they had to met standards to get paid, or that their payment was being offset against some alleged tax bill. I once had to negotiate with a car dealership the university police department was trying to buy a car from and had the owner tell me that he just discards bid invitations from state agencies and would never sell a car to a state agency unless the sale was COD.