Most of Western Canada is bear country.
You don't generally carry a gun for safety, Black bears are not likely to attack and even grizzlies would prefer to run away.
You can get a license to hunt black bears with a gun or a bow.
It's not generally thought that the safety on the Grouse Grind would be improved by 5000 hikers all carrying rifles.
Polar bears are different - if you are outside in polar bear country you need to have a gun - and ideally somebody with you with a gun who knows what they are doing!
Legally you can't have a gun in a national park - so there is a loophole where Inuit guides are allowed guns.