How is this even a thing? I don't know much about the US political system but how is it that the police is not entirely subjected to civic government and why does a law need to be passed to control what the NYPD does?
First, there will be those who are devoted to the goals of the organization. Examples are dedicated classroom teachers in an educational bureaucracy, many of the engineers and launch technicians and scientists at NASA, even some agricultural scientists and advisors in the former Soviet Union collective farming administration.
Secondly, there will be those dedicated to the organization itself. Examples are many of the administrators in the education system, many professors of education, many teachers union officials, much of the NASA headquarters staff, etc.
The Iron Law states that in every case the second group will gain and keep control of the organization. It will write the rules, and control promotions within the organization.”
— https://www.jerrypournelle.com/reports/jerryp/iron.html
In other words, the police, like essentially every other organization, is trying to preserve itself and expand itself. It only aligns with the wishes of another organization, e.g. “the tax collector”, as far as it serves their own goals, either because it furthers their goals directly, or if the other organization is in a position to threaten their own goals of preservation and expansion.