If you read about the historical origins of the US police force, their (verifiably documented) lineage goes back to the days of English colonialism. Those original patrol groups were created to "protect" the damage/loss of property- namely to prevent runaway slaves from escaping their owner's control.
The US police force has, quite literally, always been first and foremost a way for the richest upper class to protect their wealth, power, and assets. They are a way to keep the status quo. The fact that they (sometimes) help poor and working class citizens is merely a by-product of their primary goal.