What a great piece of video!
The bear's reaction to the gunfire is interesting. I've chased off dozens and dozens of polar bears, and I have come to the conclusion that they seldom react to live fire. When they do react, they move off grudgingly. Ricochets make them move, but at the risk of a wounded bear. Cracker shells get them moving, but live fire doesn't impress them much.
I think the bear in the video was so close that she found the sound of the muzzle blast very painful, and that discomfort combined with being startled is what turned her. I've seen a young polar bear approach the shooter when a .44 revolver was fired over his head, but he ran off a bit when a can of tattoo die was thrown at him.