Not to step out and defend cops too much but this narrative is unfair...I believe the right to bear arms includes guns and we pay for that as a society. The ones who pay the most are LE. They primarily have to deal with the worst elements of society and the most volatile of individuals. I don't envy the job. I would be scared all the time too.
Chances of me being shot at work are near zero. Chances that a street cop is shot are relatively high. However, they don't take too kindly to allowing threats to themselves or other officers to go unchallenged and are primarily interested with maintaining a sense of being in control of any situation they step into, as a matter of human psychology. People tend not to fuck with the people in charge, even if they don't see weapons. This is how the safety element is framed and it's not intrinsically foolish.
This naturally conflicts with various Constitutional rights, even in theory, so we get these crazy cases where it's a matter of reputation. You mess with the cops, it can come back at you. Americans expect, that almost everywhere, this holds true. This sounds like a lot of power structures in modern society, does it not? as bamfly pointed out.