Depends a lot on your upbringing and socio-economic class.
I was brought up in a culture where Omerta was something you followed. Snitches end up in ditches. Cops weren't to be trusted. If you had a problem, you dealt with it or talked to people in the community and it got resolved.
I shit you not, this was 1990s Toronto. I know other ethnic communities that have similar distrust of police based on police from the home country. And honestly, mass media and events throughout North America of police brutality have reinforced the 1312 belief in various communities.
Personally, I have taught my teens to treat cops the same way as you would a K9 Dog : Be polite, Yes Sir/No Sir, "Am I being detained, Sir?" But also....sadly...no sudden movements, keep your hands visible, and if they put hands on you, go limp. As we have seen with George Floyd, and countless other situations.... if things get tense, dog is going to bite.
I understand "Not all cops..." but I view it the same way as weapons safety: Treat every gun as its loaded because it's the time you're complacent that bad things happen.