Yes. People with evil intent or contaminated thinking are always a concern. So are animals. Honestly, aggressive dogs are probably more of a concern where I live. Coyotes and black bears tend to stay away from people. I rarely see them but when I do, quiet observation is usually enjoyable. If you need them to go, shouting usually works.
The issue is if it doesn't. Given the size of black bears I've seen, .40 S&W is probably fine. Solids in .357 Sig or .357 magnum could be better, though a full barrel length would be wise in cases where those calibers are the right choice.
Curiously, most of the animals I've "faced" would probably have fallen to a .380. One was a coyote that snarled a little before deciding to turn tail and run. One was a gray fox with cubs in her den. She barked and stood her ground, but knowing the situation, I backed away and let her be. Another was a foolishly aggressive goose. I say "foolishly" because a boot would have sufficed. It was on a friend's land though and he asked that I back away and give it space.