I'd also add that the prevention of crime and the apprehension of criminals is a secondary function to the main function, it's part of it in other words. if the police were to stop investigating all crimes except that against rich people, not only would you probably get at least some proportion of officers refusing to go along with it, but you would also get a huge increase in social unrest, fear, as well as the odd outbreaks of vigilantism, all of which would add up to a challenge on the state's power. if for example, there was a serial killer going around murdering people, or a terrorist attack, and the police did absolutely nothing, there would probably be riots, or worse, and whatever committees were set up by w/c people to investigate these incidents themselves would almost certainly represent a challenge to the government.
i have no doubt that there are many decent police officers who are dedicated to their jobs and the idea of making their communities safe from criminals, we also have anecdotes from the miners' strike about how the local coppers in south wales villages supported the strike and even confronted cops from outside, and in egypt where they had to bring people in from the countryside to the city to "police" the riots. i think that, as well as the police not having the right to strike, the fact that police at least these days often don't end up working their whole careers in areas they've known all their lives, also contributes to this alienation process, where they will feel a lot less empathy with the local community than they would otherwise have felt.