Before discussing policing it will be helpful to understand some of the systemic context in which US policing is embedded. It is useful to understand the constraints that financing and flows of money have on human social and organizational systems. Hidden flows of money often help explain otherwise irrational system dynamics. Let's stay open to the fact that policing budgets are augmented by incarcerating people and that political pressure prevents them from incarcerating the elites willy nilly. Thus they incarcerate (for about $120/day per inmate) people without political power.
Also a bias in injected into the system to hire and reward police who arrest people without political power. Keep in mind that all it takes to have the system move in this directions is economic advantage to the police budget for incarceration. It does not require any particular ideology, or racism, or xenophobia. The economic pressure nudges the system in these directions, they are not prerequisites nor drivers.