You don’t mess with animals in the wild. I’ve recently learned from walking in a forest full of black walnut trees that the does living in there will stare at you for a bit, then run off deeper in the woods when you get close enough. Bucks, even if they don’t have antlers will stand their ground, and start stomping their front hooves in the ground occasionally. I get the message the first time.
It’s a warning to other deer within earshot. The bucks won’t bother you, either.
The does in our yard stomp their front feet at me when I go out in the garden, especially in late spring when they’ve thrown their fawns. I stomp my leg right back at them and the unnerves them. They take off when I do that (or yell, growl, wave my arms, etc). I play it differently with the bucks, especially this time of year.
Black bears that are hunted are easy to spook or scare off by running at them and making loud noises.
I have treed several by sounding like a dog.
Bears that haven’t been taught respect for humans are a different matter.