Have you read the 1619 Project?
Their analysis is that policing in America evolved out of "slave control". They make a strong case and are certainly correct in seeing that as one of the roots of police practices in the US.
While I agree with them in general. I think they focused solely on that and ignored other aspects of police work and society's expectations of police.
A lot of police work is about the protection of property and control of the "working poor".
Police in many African nations are about on par with what we just witnessed. Except it's about "class" and wealth instead of "race".
"Police Work" and "Sex Work" are both jobs that society defines and manages but doesn't want to look at closely. Our society certainly doesn't want to pay for good high quality police work.
We treat it like we treat teaching. A job that's "essential". That we try to pay as little as possible to get done.