Have you ever been attacked by a bear while you were hiking in the woods and why did the bear attack you? Was it hungry or defending it's territory?
No. I would never go into bear territory unprepared to defend myself against a bear.
People who ask the question "WHY do bears attack" are just trying to "Justify" the bear's actions; as if to say, "The Bear had a right to attack because it was defending it's territory or it was hungry." But the truth is, why a bear attacks a human is an irrelevant question.
The plain and simple fact is; you only have one life and you don't get a do-over or respawn like in the video games. This means that you have the irrevocable right to defend your life by any means possible against anything that would seek to take it from you for any reason. So, why a bear attacks a human is of zero concern when your life is on the line. The only question that really matters is, are you prepared to defend yourself against a bear attack?