Every public employee belongs to their public union, and they run the city, not the other way around. Who can afford it?
Speaking entirely from a California perspective, police unions have very little, if any power within a city and certainly do not “run the city”. In most cities, the police “union” only exists because the city needs a face to negotiate with at the time of contract issues. Most cities run on a two year budget and at the time the budget is compiled the city will determine it’s stance at the negotiations and have maximum expense that will be of issue during negotiations.
The problem with police salaries is simply a matter of supply and demand, which is exacerbated by a limited labor pool, namely those who would choose to be police officer.
Also in California, police officers recieve a certifcate from the state, a sort of license, which allows them to transfer laterally to any department in the state. Additionally, most cities contract with CalPers, which allows the officer to maintain his/her pension benefit, when if they choose to transfer.
So to stay competetive a neighboring city must have comperable salaries and benefits, if not, officers are often enticed to go where the compensation is better.
As to who can afford it, that is also being taken care of, as hiring in local agencies has ground to a halt. Contracts will be changed and departments will get smaller.