A dog can be trained specifically to protect a person and in some cases the potential gain is greater than the risk. Still, the risk is there. I would never trust a dog that I did not know well and that I could not overpower if need be. Many people do and that is why they get bit, mauled, and sometimes killed. Doesn’t mean I don’t love my dogs, but I never forget that they are animals.
This attitude also saves me a good deal of money sometimes. My dad once explained it to me this way. “It’s a dog. If it gets sick, shoot it and get another one.”
I’ve got two dogs that guard me with their every waking moment. One is an Aussie Cattle Dog and the other a Border Collie. The Collie merely places herself between you and the risk, sweeping back and forth to keep it’s attention. The Aussie will leap to action with all teeth, grip, and will not let go until I tell her to. She can be so mean with cattle that all I have to do is call her name and all the stock will group and circle. She can bring em in or take em out like yelling fire in a crowded theater. The collie is more subtle and works em better in close quarters or when there are calves or lambs on mothers.
But a Bear is not a socialized animal. Just being around people is out of character. Bears aren't around other bears for much of their lives. So they don't get how to protect each other. If one bear crowds another they fight.