So what's the proper behavior if you encounter a bear in the wild?
The black bears in the High Peaks of the Adirondacks (first ever solo backpacking trip) were more like racoons than anything. This was late summer, after the cubs were old enough so one didn't have to worry about Mama Bear. One night, a few miles away from one of the trail lodges, I heard one snuffling and stomping around the tree where my food was hung. I'd proactively collected a small pile of rocks outside my tent door, so I spent the night waking up to throw rocks at it.
Being around any bear, black or brown, when cubs are nearby is sooo dangerous; mothers are unpredictable and can get vicious. Never get between a cub and it's mom. Walk the other way, quickly, and stay upwind. Carry a zoom lens to get that great picture of the cute cubs.
As for wild brown bears, here's the advice for that was passed around the ranger staff (my parks didn't have bears, but we all visited parks that did): if the bear isn't watching you, stay downwind and far away. If it walks or wanders towards you, be casual and try to get downwind, because wild bears are curious about your smell. If it charges, lie face down, arms stiff at your sides, even if it comes near and just sniffs you. That makes it surprisingly hard for the bear to turn you over and protects your vulnerable parts. Some forest or park ranger had done that the previous spring; her back and the back of her head were wounded by the bear trying to turn her over, but her face and abdomen were undamaged. The bear had gotten bored after a while and wandered off.
Whatever you do, don't run or climb a tree. They can do both much faster than we can, and running makes them extremely interested in you.
There's a funny story about me and a few hippy friends in Yellowstone in May standing around a fire and getting freaked out by a crashing noise by the river bank. This was before I had any idea what you were supposed to do, so before I knew it we were flying across a rocky meadow, barefooted and half dressed, and hid in a copse of trees, where Jeanie kept trying to climb a tree and each time she did I pulled her down by the waistband of her jeans. We eventually crept across the meadow back to camp, nervously singing "keep on the sunny side, always on the sunny side, keep on the sunny side of life." We slept very, very badly that night, and the next morning we saw that the noise was from a huge tree branch driven into the bank by the high water.