There are two main reasons why policing is mainly a local affair. One reason is legal and the other is more practical.
The legal reason is connected to federalism. The US Constitution leaves issues of policing essentially up to the states. We do not have a centralized police force such as exists in some other countries. Our system of federalism makes it more likely that policing will be localized.
The second, and perhaps more important, reason has to do with practicalities. The United States is a very big place with lots of very diverse communities. American communities can differ so much from one another that it would be very hard to have a “one size fits all” approach to policing even within a single state. It is inevitable that policing needs to be controlled locally. With local control over policing, each department typically takes on its own culture and style.
Thus, policing in the US has come to be mainly a local affair both because of our commitment to federalism and decentralized government and because of the diverse nature of our country’s communities.