David Whitehouse writes a “people’s history" of the rise of professional police, based on historical events in Britain, the northern USA, and southern USA.

The central assertion is that professional police forces were introduced not to enforce laws, but to handle crowds. Throughout the essay, the author shares historical anecdotes about ways that communities addressed crime and justice before the introduction of police forces.

I highly encourage you to read the essay for the additional perspective and insightful quotes. I say this even as I hold my own reservations about it, such as for highly-speculative or polemic parts.