Agreed: anything that avoids an encounter is the easiest and most efficient course.

I have no absolute opinions about last-ditch defensive tools; that is determined by the individual's preferences and the laws of the jurisdiction in question.

Perhaps it is worth mentioning the well-documented occurrence of "false charges," where a bear makes a charge that is a defensive bluff, an intimidation tactic, and then veers off at the last moment. I am not sure an underpowered firearm would be your friend in that situation: once wounded, a bear would not veer off. The deliberate near-miss noisemaker/popgun could still be a useful deterrent though.