I expect some controversy for this observation, but jobs that come with power over other people (like being a police officer) seem to attract a disproportionate ratio of assholes.
I have no doubt there are good cops. But the nature of the job makes it appealing to a certain audience.
I spent some time in the US military in the 80's and 90's, and it was similar to the situation with cops. It did seem to improve after the infamous "tailhook" scandal, but I suspect it's still bad. "Absolute power corrupts absolutely" seems unavoidable. Human nature is what it is.
I have no doubt there are good cops. But the nature of the job makes it appealing to a certain audience.