Not taking sides here - I always carry a handgun in bear country - but here is an article describing an interesting study of the effectiveness of bear spray v firearms in bear encounters. Some of the methodology is equivocal and the conclusions drawn are questionable in some ways, but a good read nonetheless:
I realize you're not saying this article is definitive, but it's definitely biased in favor of bear spray.
"In Alaska, there have been no human fatalities in encounters where bear spray was
used." A little behind the times, there have been at least two since the article was printed. Zero where a firearm was used.
I also have to wonder about cherry picking data. They don't mention the fatalities in the rest of NA where bear spray was used, just that there were none (at the time) in Alaska.
Bias as mentioned above:
"In addition to a far better record for human safety, another advantage of bear spray is that it leaves bears alive and healthy. Smith and Herrero found that bears died 61 percent of the time when people used firearms. Many of the encounters involved females with cubs, and a dead sow meant orphaned cubs. No one knows how many of those encounters were bluff charges where the bear would have pulled up short of an actual attack."
Reading between the lines. "We don't want bears killed, so wait and see if it's just a bluff charge. If it isn't and you're using bear spray...well, at least you didn't hurt the bear."
From "Wikipedia bear fatalities"
"Blais was communicating with her father from a satellite phone while camping with her two children and husband at a family cabin on McKie Lake when the bear attacked her. Her husband, Curtis, was inside the cabin's kitchen 98 feet (30 m) away. The investigation showed the attack was unprovoked and predatory in nature. Curtis subsequently sprayed the bear with pepper spray, but this only aggravated the animal. He grabbed a gun and shot it twice, killing the bear."
Too late to save his wife. Obviously should have grabbed the firearm first.
In reading about these fatalities, I have to wonder how many times bear spray failure isn't even mentioned. For example:
"Johnson, a contract employee for Pogo Mine, was killed while collecting soil samples. The bear was shot and killed by mine personnel."
There are lots of descriptions like this, but what's left out, at least in this case that I'm familiar with is the total failure of bear spray. It's not mentioned that there were two women together. They sprayed the bear to no avail (weren't allowed to carry a firearm for the job). One escaped and went for help. Armed workers came back and killed the bear while it was feeding on Johnson. This is the case I mentioned that any sort of firearm would have saved her life. Once again, bear spray didn't.
For some reason, with multiple examples of serious bear spray failures, and almost no human fatalities when firearms are used, people keep touting bear spray. I understand the Sierra Club ideological thinking, but don't quite understand it for people comfortable with firearms.