That is what bears do when they are hungry. They can’t go to Mc Donald’s and order a Big Mac with fries and coke.
Unsocialized/untrained dogs will do it, too--for fun. They go by instinct and don't know any better otherwise. Hopefully the bear won't be killed for this but if it is, it will not happen by taking it out back and shooting it in the head.
This is a bear we're talking about...