You're describing a problem with the prosecutor's office, not the police union.
Case in point: in the Freddie Gray case in Baltimore, the police had failed to serve search warrants for the officers’ personal cellphones.
And if they had been Wal-Mart greeters instead of union employees, they would've been fired on the spot.
And they hinder prosecution in a way that essentially amounts to blackmail. They threaten that the police force will become less cooperative with the prosecutors office. An office that depends of the force to do it's job. A prosecutor should be able to look into charges against a police force without fear of retribution by said force. But they can't. And police unions are the spokespersons/ringleaders of the entire scheme.