In the US the relatively recent shift to use of the term “law enforcement” both reflects and drives a self-destructive nature in the broad culture.
Your insightful point, “The police's sole purpose is to punish crime, not to prevent it” has several implications.
First is that even if you have a positive view of the cops (and if you are not in an “out group” you should) you still should follow this advice. If you’re not chatting with your next door neighbor the cop at a bbq, what you are is an unpleasant barrier to getting their job done with a minimum of hassle. Like you think of Jira or Confluence.
Another implication is to understand that their role, in cultural norm, in who it attracts to the job, and simply the cumulative impact of what they are exposed to, drives what I will euphemistically call “destructive impact”. We need cops like we need the weather, but that doesn’t mean we don’t take steps to deal with the destructive force of storms, and even to minimize storm generation.
Unfortunately the US is in a phase where they think the more brutality the better. In that the cops correctly reflect what they are asked to do.