From what I can tell, it is typically the case that when a prosecutor attempts to prosecute a police officer for misconduct, there is immediate stonewalling and a lack of cooperation from the rest of the police force. Or a mayor tries to push for reform, and the police decides to... stop doing their jobs in response.
While I believe that the "bad apples" among the police force is relatively rare, the fact that the rest of the force is to some degree resisting attempts to root them out makes them complicit in the acts to some degree.