Even an unused or unloaded gun can prevent a crime. Guns, unlike other defenses (scissors, mace, karate, bats, fists, feet, etc.) don't need to be used to be effective.
I've pulled a gun twice in my life. Didn't need to shoot either time.
The first time, it was a bit of a stand-off. There were 8 guys who wanted my camera. I had 6 bullets. They decided they didn't want the camera that bad...
The second time, I had pulled a drunk friend out of a bar. A bunch of guys interested in a fight (that my drunk friend was trying to start) followed. A second friend pulled a 30-30 out of the truck and pointed out we were leaving already. The guys decided to return to their drinking.
No shots. No police reports. Had a high potential to get very ugly both times. I always figured, it is better to have a gun you don't need than need a gun you don't have.