I used to volunteer at a pound near where I live and they had several pits at that time that were seized fighting dogs.
Still had to feed and clean up their cages though, but no one wanted to go anywhere near them due to how aggressive they were. Still, had to be done so I open the cage of the first, he charged teeth first - so I popped him in the nose, hard. He backed off, fairly stunned then tried again with the same response from me. After that he and I were pretty much good buddies until the day he was put down. And I was the only one who could go anywhere near him.
With pack oriented animals, its a dominance thing. Granted, if a random dog on the street is coming after you, you are likely not going to take time to play Cesar Milan.
But as far as responding with a firearm, Mleake put it pretty well, bullets have a way of doing things you don't want them to do - no matter how good you are.
"The best diplomat I know is a fully charged phaser bank" - Montgomery Scott