I have a theory that policing just naturally attracts assholes and bullies. I have anecdotal evidence to support this.
I think there is a more important nuance here you are missing. Policing attracts people. And then those people get surrounded with the absolute worst assholes and bullies there are out there. They arrest them. They fight them in the street. They hear decades of stories from their fellow officers about the shit they have endured. And then, when they do catch a bad guy, and he gets let off with a fine and "time served", they realize the system is just fucked up, and they are powerless to do much about it. So now you have a self-proclaimed "good guy with a gun", and you send him specifically into bad situations with "bad guys", and tell him to fix it. And then don't support him after he does that job. While there are good guys in senior roles at every police department, who have weathered the storm and kept their humanity, there are far more that haven't. Ever been to a policeman's barbeque at his house? Nope. Because you aren't a cop, or the wife of a cop. Their job is so stressful, and so shitty, that they ONLY hang out with other cops, because they don't know how to socialize with people who don't see the shitty side of the world the cop sees every day. It is a fucked up system that takes good people with good intentions and turned them into jaded assholes who just want revenge against any perceived "bad guy" they can get their hands on. (Sources: Friends who were cops. Dad worked with police forces, too. And I have a close friend who is a therapist for cops and works with them after they shoot someone.)
I dated a cop's ex wife. He threw hundreds to thousands of dollars worth of her stuff in a dumpster out of spite. I've also been harassed by cops because they were admittedly bored. I'm not saying this means your wrong or that my experience dismisses your point which are good, just when I try to think of the mindset that would seek to become a cop and pull people over to search their car at 1 AM for a burnt out headlight it aligns with guy who would throw a psychotic fit because his ex wife is dating more than guy that wants to help the community. Both exist but I think the majority breaks on the side of assholes who want to be paid to be assholes or bullies who want power.