This is obviously a tragedy. But it is far from a common occurrence, I was raised in that area and animal awareness among residents is generally pretty high in towns like Canmore. There are of course issues with tourists. Not to say the individual who was mauled was not an experienced woodsman, as he likely was if he solo sheep hunting picklejar.
I know I am a noob here but, I largely agree with "track", I will voice my opinion a little differently:
I work in the bush and have had encounters with bears and cougars. I always carry bear spray. I have doubted its effectiveness in some situations with lots of heavy cover and pounding rain, but I feel these situations would also limit the effectiveness of a firearm.
In situations where a firearm was to be used for defence against a wild animal (and these would be crazy situations, I have worked with biologists who did bear den surveys in interior BC without firearms) I would far prefer a shotgun loaded with slugs or a high caliber carbine with optics tailored for quick acquisition to a handgun. If a bear is mauling you, it is incredibly unlikely you will have the ability to draw your high caliber handgun and shoot it one handed into anything but your own femoral artery.
Hunting offers a more dangerous scenario because you are often moving silently in optimal habitat for bears, and may be stalking the bear's prey in some seasons or the bear itself. Gutpiles, gunshots etc. attract some learned bears. Once again I don't feel like a handgun is optimal for bear defence, or that having a handgun or even a 12 gauge defender will stop a bear in the circumstances where they attack humans. Sows with cubs will always be extremely dangerous, handgun or not, and if your life lies in the split second it takes to fire bear spray or a firearm there is always a chance they will fail you.
How effectively a firearm can stop an impending attack is dependent upon bullet placement, not upon which type of firearm it comes from. Gun handling under threat is a study which too few take the time to consider, but the advantage lies with the individual whose mindset is prepared in advance of having a problem. The premise in the bear protection scenario is simple enough, a bear cannot hurt you if it cannot touch you, so your efforts must be towards stopping its forward progression. Yet the hunter is predisposed to a chest shot, because the morality of the hunt demands that he select a target which is easy to hit and which will produce a humane death in a short period of time. You need a mindset which gets in the way of that. A bear hit solidly in the chest with any viable rifle bullet is a dead bear, but a chest shot bear is not a stopped bear, and much can happen before his brain becomes sufficiently deprived of oxygen to stop him. Defensive shooting follows a different playbook; a humane kill is secondary to a stop. If I have to stop a bear with a handgun, I know the situation is extremely serious, and I will not shoot early, but I must shoot before he makes contact. First there is the hope that the bear will turn off, and secondly the closer the bear is, the better the chance is of placing my bullet precisely. I am not shooting at a 1000 pound bear, I am shooting at the center of a 100 pound head, and a handgun bullet from a .357, a 10 mm, a .44 magnum or .45 Colt is more than enough for the through and through penetration of a 100 pound target. The shot is challenging; the bear's head is massively wide, but the brain is only the width of the snout, and is located in the shallow space between the back of the eyes and the ears. Secondly, the bear's head might be in motion, although in serious attacks, the bear is normally focused intently on his target, and his head is for the most part stationary. I want the minimum range, a matter of feet, not yards. If my shot hits high, it should be inline with the spine. If the bear is circling rather than coming straight in, breaking a big bone like the hip will give you time to a fast lethal followup.
Last year there was a young girl who was attacked by a polar bear at the other end of our street. Her recounting of the incident is precise and detailed. She knew what was happening, as it happened to her, including her scalping, without any sensation of pain. Given that level of awareness, and calm demeanor, a mauling victim who was armed would have been fully capable of effectively defending themselves with a handgun, but not a long gun.
Now as you say, you may not prevail. The bear might win. But how is that any reason for being legally disarmed, with the one firearm that might save you?