I have been on foot in the backcountry of Yellowstone and Grand Teton many times. Very, very commonly the wind was blowing so steadily that the only way bear spray would have worked is if the bear was perfectly and directly downwind from me, and extremely close even by bear spray standards. At any other vector the wind would have whisked the spray away.

You can't afford to get that stuff in your own face, so there were times when my pre-planned response was to go to the secondary option.