Most of all recorded bear attacks in the wild have resulted from the human surprising the bear. Most bear attacks occur from hunters suddenly appearing in front of them, which startles the bear into an instinctive act of aggression. It is recommended that you try to hide your movements so that you don't frighten the bear.
One of the most treacherous situations that lead to bear attacks is when a bear perceives a threat to her offspring, which is how the term, "Mama Bear" came to fruition. Female bears are very defensive of their young, and they are incredibly reactive and protective when it comes to their cubs.