Cops tend to live in a somewhat insular world, they have cop friends, their 'cops only' forums or sub-forums on some message boards, and cop bars. They tend to work with (well, arrest is a more descriptive word) people who are usually dangerous and often armed. When the pack gets together and talks about 'how work was' it will tend to reinforce the actions of the pack members, that's just how life works; you support your own.
Cops get to see dangerous people carrying and using weapons against cops---
Cops get to see people carrying dangerous weapons ---
Cops see you carrying a weapon.
Cops see you as dangerous because that's what the usual result is when they see someone-not-a-cop with a weapon.
If, when you chatted with friends they all regaled you with tale after tale of almost daily encounters of being lit up by blue lights and pulled over by the cops, and one night you happen to see blue lights coming up fast behind you, it's not illogical to assume that those blue lights are for you. Of course, the officer really just wants you to get out of the way so he can respond to a bank robbery just up the road, but that's not what the tales you've been told have been about.
I hate to say it, but from personal experience the people that are most afraid of me being armed are themselves usually armed as well....... and wearing shiny badges. I've never encountered someone running away in fear at the sight of me being armed.