People misconstrue the gun as a symbol of violence as a symbol of heroism. You can see this in real-world integration and storytelling. A message of peace and ethics does do not mean that all or even most characters in a story should not use guns. The idea of a story is to understand human reality, and entire characters can be the embodiment of an archetype or distilled part of us. This part of us could be good or bad.
To ethically use a gun in a story the literal act of violence shows us a negative part of our psyche that we along with the story can overcome.