There are a lot of racist cops. There is no doubt about that. It is a well-paying job that haters can get and continue their prejudice. If you ever hung around with cops, their attitude and speech would appall you. No, not all cops are bigots and haters, but a lot of them are and they are the face of departments. They make the news.
The cops I used to be friends about thought they should be judge, jury, and executioners. They hate judges for not backing them 100 percent, They hated prosecutors for not doing as the police wanted. They expected the evidence to be slanted to back them. Their loyalty was to each other. The law and the court systems were supposed to back them and help them.
Departments have a huge white power force in their departments. The force is a refuge of military men with PTSD. They have drinking problems and ego problems. Many have anger problems.
There are some reasonable people in the police, but they are the minority. You never know what kind of cop you will encounter.