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?
The separation of powers in NYC/NYS is very messy so this doesn't surprise me.
The police union, however, is a very organized labor union, and the current mayor was brought to heel even though he was elected on the most anti-police platform of his first election.