It's like why people hate police. When you're dealing with them, you're already having a bad day. And we tend to hire mediocre people for the job because all the better candidates are doing better work.
I've got a great friend who's in the police service. They aren't all mediocre, but there's an awful lot of them and bad apples rightly get a lot of attention. I think the problem with policing is that it's been disproven that it's just a few bad apples, and that they forget the adage is that a single bad apple spoils the bunch. There's also very little public accountability for bad policing, which is the opposite of what it should be, punishments should be public just like their promotions and commendations are. If people were seeing actual bad policing getting punished appropriately there would be less outcry. You also can't take back killing someone.
It also helps that police can legally end or ruin your life with no real repercussions if they’re wrong.