In the contiguous US, if ya see any large predator in the wild that you're not specifically hunting, you're lucky. Be quiet, be really still, check it out, shoot it with a camera, be grateful, it doesn't happen that often.
If a bear seems like it might actually attack you, shooting it would probably make it more likely to attack you. Bear spray, worn on your belt, is much more effective and you don't have to do any of the paperwork that comes with a dead bear out of season and in the wrong place. Plus, you get either the satisfaction of knowing there is a very grateful live bear somewhere out there, or the tension of knowing that you have created a bear adversary for yourself that you will one day have to epically battle with only a knife and your wits, which ever you prefer.
Bear spray will work even better on big cats or whatever, if they don't just suddenly latch on to your neck.
Unless you're in Alaska, the human predators are the only real threat that requires a gun. I don't know why anyone would mess with a dirty, stinky, smiling jerk like me, but, I go in the woods with women and children and other people who I feel chivalrous about protecting. When you can't call the "authorities" for help, you are their last line of defense. I prefer my .45 and a couple mags. If you shoot well with a 9mm then use it. You bring it because it's the correct tool to protect yourself and your loved ones.
If I had any money I'd get one of those composite-polymer-kind revolvers that're really light, in the biggest caliber I'm comfortable with, and a couple speedloaders. It's more reliable than an automatic especially in the dirty woods, and weighs way less.
Scarecrow, you're hilarious.
Note to bad guys in the woods: In Idaho, that innocent looking chick is probably a better shot than her boyfriend.