And who tells them the order is illegal? You?
The police agency’s senior officers (Captains and Lieutenants) and its Chief have the primary responsibility to refuse to carry out an illegal order just like in the military but all police officers have this responsibility.
There are plenty of examples of police chiefs around the country refusing to follow illegal orders beset on them by criminal politicians.
JoMa