We used to stay at a cabin in the mountains. There were plenty of New England black bears around, which were habituated to humans. This bothered me because I had my children with me. I bought a dog who grew up to be about 100 lbs. The forest rangers would hire people with big dogs to chase the bears further up the mountain, away from the people. Naturally, since my kids and I would drive around the mountain we were on, at night, we saw a lot of bears. Our dog came with us, and became habituated to bears.
So one day, after lunch, the kids were sitting around the picnic table with marshmallows they had toasted on the campfire. I saw Kid #1 waving his marshmallow stick around, gesturing as he spoke. A bear bellied up to the table. Kid #1 leaped onto the porch (over a 4' wall), and came into the cabin trying to speak, but no sound was coming out of his mouth. I said to him, did you try to steal someone's marshmallow? Then I heard a scream and everyone else came bounding inside. The bear left because my friend screamed. Everyone left our relaxed big protective dog outside on his chain. I went out there and got him. The bear was long gone, but it wouldn't have mattered.
Another time, my friend came home from the grocery store. She came up one side of the porch that stretched along the front of cabin, and made it to the door. Meantime, my children saw a bear climb onto the porch from the far side and walk toward my friend. So the kids locked the door! Luckily, I realized quickly what was happening and let my friend inside as the bear quickly approached her.
Of course, we had all been apprised of what to do if a bear approached, and how to keep food out of their reach, etc. They may have been habituated, but they retreated from loud noises and waving arms. We went to that cabin for several years and no person was ever hurt by a bear, even though they were around quite a bit.
The only reason we stopped going there was because they quit allowing dogs. That was because of me. A ranger had been stalking me, and when he made an overt move in front of my kids and dog in the dark, later at night (I scared the man away), I did some investigation, and found out the same man had been stalking other women and being a peeping Tom for years. The guy was the cousin of the the man in charge of the forest, and therefore, nothing happened to him, even though he was reported by many.
So I called the right people, they sent a lawyer from Boston, I gathered all my witnesses, and the man got fired. In retaliation, the man in charge banned all dogs from the forest. Why? Because of my dog. It was a shame, because my dog was beloved by everyone. I mean, when I took my kids somewhere that dogs weren't allowed (like a county fair), I'd get lots of people volunteering to keep him at their place. Basically after taking care of the stalker problem, I was pretty well known there. The second in command tried to talk me into saying my dog was a service dog, but that would have been the wrong thing to do, so we just stopped going there.