I know it's just a joke. But, black and brown bears are very intelligent and quite peaceful creatures. I've run into forty or fifty in the wilderness. I've never once felt the bear was considering an attack. They're smart enough to recognize our complex behaviors as a large risk to their safety.
The story of the vast majority of humans mauled by bears:
Your dog has a perfect record of defending the pack. Every single time the target either runs or turns out to be friendly. No other pack member defends. Its primary reason to exist is to defend. A bear has a perfect record of fights with anything but another bear.
One day the bear smells some food, good stuff it can't find normally. It's some campers with their dog. The dog smells the bear, full adrenaline drops for its whole reason to exist, and defends the pack. The bear wins in about one second.
The human defends the dog. The bear fights because that's what it's doing right now. Then, it reconsiders and runs away. Finally, the Forest Rangers track down and kill the bear quietly, preserving the tourism the community relies on.
We're really shitty to bears, at least here in the US. They're not even very dangerous relative an wild elk, moose, or even free range livestock. It's the big and dumb ones you need to watch out for. And marmot. Never disagree with a marmot.
I just like bears, know a little bit, and think they're getting fucked over in many parts of the US. I definitely wasn't finding fault with a joke.
If you tried to scritch a wild cat you might just get away with it for awhile. But, you're never getting that hand back :)