Teacher's unions aren't there to improve student outcomes. They exist for he benefit of teachers. Police unions aren't there to improve public safety. They exist for the benefit of the police.
There are problems with certain unions, but that has to do with the framework around them. When a police union protests because one of their members is found guilty, that looks like a union problem but it’s really a symptom of a deeper leadership problem: you’re hiring a ton of cops who think they’re above the law!