If you have tenure, and you don't cross the thin blue line, you are untouchable. Your local police union can absolutely ruin a local politician's career[1], and in general, make life hell for your city, so most of the politicians don't try to rock the boat.
When they do, they discover that the police, despite being employees of the city will just refuse to do what they are told. Sheriffs magically turn into constitutional scholars, and start unilaterally choosing what laws to enforce[2], start blatantly violating the city's bylaws, and instructions from the mayor[3], and when pushed in the only way they can be hurt (The budget), engage in malicious compliance.
Picking a fight with the police union is generally speaking, not a politically savvy move.
[1] Mostly by doing a deliberately poor job in the district they represent, and being incredibly vocal that the reason they are doing a poor job, is because the politician is causing them problems.
[2] A number of sheriffs across the country made it clear that they won't issue Covid mask/gathering citations, despite state and local law, because the law is an obvious violation of... Some constitutional amendment that they can't name.
[3] After weeks of violence, Seattle city council banned the use of crowd control weapons. The SPD celebrated the very next day by gassing and blast-balling crowds.