Those guys are very unpredictable!
I was taught that once, but it ain't true. Bears are actually very predictable. Problem is, people talk about "rules" about how to behave around "a bear". But there's two species of bear in North America (if you don't count polar bears), and the "rules" are different for the two species. So the first thing you have to do is learn to identify them.
There's lots of ways to distinguish a Black Bear from a Grizzly Bear, but in an unexpected encounter you need something that's easy to remember and quick to spot, so ... Black Bears have big ears that stick out from the head (just like the one in the picture). Grizzly Bears have small ears close to the skull. Black Bears have curved claws that are hard to see (just like the one in the picture). Grizzly Bears have long, slightly curved claws that look like fingers sticking out from the fur on their paws. So that there's a Black Bear.
Black Bears are pretty mild mannered and unless they are very sick, or starving, they'll tend to avoid confrontations with people. That one is probably hooked on garbage and has become accustomed to people. Shouting at it will be a minor distraction, which it will ignore. Shouting louder will just reinforce its view that people can be ignored.
I train the Black Bears that hang around my house (on their way into town to "shop" for garbage). All it takes is a pellet gun and my voice. First thing I do when one pauses for a visit is shout at it -- if it takes off in a hurry, it's probably been here before and knows what comes next. If it doesn't take off, it's either a newcomer or dumb. That one gets shouted at a second time and gets a pellet bounced off its rump. I don't know why, because even with all that fur and even at a fair distance, they really don't like that pellet whacking them. In any event, I've had 300-400 pound Black Bears take off like a shot when they get dinged by a pellet. A couple of treatments like that and they learn to recognize my voice. Just a shout will drive them off after that.
When I used to work next to the local recycling depot, if a Black Bear came by I'd climb up on a bale of cardboard to get above it and bounce a block of wood off its head while shouting at it. That sent them packing.
Grizzly Bears are a whole other story. I treat them with a lot more respect. Now loud shouting, no bouncing things off them.
Unless you're a knowledgeable and experienced hunter, shooting at a bear (with a firearm) is a bad idea. They don't go down easy.