Sometimes human beings do stupid things.
Sometimes human beings kill each other, act like assholes and do other crazy shit.
Cops are human beings. So there can't be exception for them. They are not aliens from the other planet.
There is no speical race for the profession. No ideal extraterrestrials to choose from. All you have got are the same old human beings, with all their sins, problems and disadvantages.
People are not ideal, and cops would never be ideal as well. Doctors are not ideal. Plumbers are not ideal. But not cuz they are doctors, plumbers or cops. They are not ideal cuz they are people!
There is no way you can change it. People will always remain the same. And there always is a possibility that among representatives of any profession you can find an asshole.
If doctor makes a mistake, it is the case of the particular doctor. Or should we "disperse" the community of doctors and ban this profession? Should we abandon police?