The risk of a bear attack is extremely small. Are you really going to carry a shotgun everywhere just in case?

Bear spray's lighter than a shotgun and ammunition, it's a good deal less unwieldy as you go about your business, and it's more effective than firing a shot into the ground. Carrying bear spray around with you is practical; a shotgun, not so much.