If you genuinely believed the police are there to protect you, and not to ensure the status quo is enforced and continues, you are naive, or you are not part of a marginalized group. That is not meant to be an overly hateful statement.
Police (and other law-enforcement) are an exercise of the power of government. The former exists to ensure the latter can continue to exist.
Therefore, police (and law-enforcement) exist to enact laws to preserve the status quo and whatever accepted social mores happen to be in vogue at the time via statute. Protecting you and your loved ones only occurs when your needs align with the desires of the state.
If you happen to be part of a marginalized group, often, power structures dictate that the desires of the state run contrary to your needs, or, more often, the desires of the state are literally enacted to make your life more difficult.
For example - Where I live, we have a saying, "No cops, no problems." This is because a) police take 45+ minutes to respond because we're very rural, b) police generally only respond by taking notes and harassing anyone they find on the scene, regardless of their role, and c) police, once they respond, are well known to run warrants on anyone around just to be able to say they've arrested someone that day (the second part of that is my conjecture, but I also can't come up with a reason they would run warrants on an innocent bystander, regardless of said bystander's past).
My need of having my car not be stolen apparently does not align with the government's need to ensure my father is prosecuted for low-level drug offenses from many years ago. (to use the next word too much, I think) Therefore, police do not have my interests at heart. Please apply this lesson to any other marginalized group to see where the problems with police come from, and why I called you naive.