Don't forget, there are federal, state, county and even city police forces in the US. They grant their security guards and marshals and deputies special police powers.
The origins of the "police" was just an extension of the band of thugs wealthy lords and landowners employed to keep the poor people under control. In merry old England in days of 'your', the local lord was judge jury and executioner... he made the rules and enforced them with whatever means he chose. He employed teams of thugs to keep the poor downtrodden so they wouldn't rise up against the few rich people in control. Eventually, they were called 'police'.