People want the government to provide the services that they use. Everyone wants the roads to be paved and clean water to come out of the tap and the fire department to show up when you call them. To do that, you have to have a tax base capable of providing the revenue to do all of those things. To do that, you have to attract and retain affluent residents for your tax jurisdiction.
If you take from the middle class to give to the poor and the next city over doesn't, those middle class people vote with their feet, and then you no longer have that money to spend on anything, and your remaining constituents are upset with you when the drop in revenue necessitates a drop in spending.