That is just inaccurate, the police don't even do a good job of that. The police, like every other bureaucracy with unchecked power, exists to perpetuate itself and enrich its members. This is not specific to the police except insofar as the police are exceptionally powerful and unchecked, and it is less a conspiracy of the powerful and more a typical dysfunction of government taken to an atypical extreme.