It seems like this gesture is well understood by a dog or cat and perhaps the combination of distracting the bear plus the indication that you mean no harm would work? Maybe a bear would even reason that the human would be good for future snacks?
You're starting from a false premise, which is that the bear has some reason to hurt you and therefore you need protection. An American black bear doesn't see a human as prey. Even a grizzly will normally only attack a human if it's surprised, threatened, or protecting its young. I assume you don't have polar bears in mind, although it is true that a polar bear may attack a human simply because it sees a human as prey.
If you're talking about black bears, then you might also want to keep in mind that they're often not even that big. A small one can be about the size of a German shepherd.
Black bears differ in how much they're habituated to humans. In a small number of very specific areas, such as Yosemite Valley, you get a large number of bears that are used to people and frequently get human food. These bears may be less afraid of humans. If they want your food, they may simply mug you for it, although it's much more frequent that they will raid an unattended backpack or find an improperly secured garbage can. Giving these animals food is a bad thing to do, because it contributes to their dysfunctional and unnaturally distorted habits.
Outside of these very specific areas, black bears are typically not habituated to humans, so they're afraid of you. You don't need to offer them food in order to escape from an encounter, because as soon as the bear sees you, it's going to run away.
If you see a black bear from a distance, just enjoy the special experience as you would with any other unusual opportunity to see cool wildlife.