Bears do not play by human rules.  There is no way to say for certain what set off this attack, but the possibility of either the bear being surprised or the possible presence of a cub are near the top of the list.  It could also be this bear was simply having a bad day and took it out on a human intruder.  I have had friends who were mauled by bear and suffered severe injuries.  None expressed any wish for revenge on the bear that attacked.  Even at established wildlife viewing areas where humans and bears may regularly interact with rare acts of aggression it must be remembered that bears are always basically wild animals and must be treated with respect and caution.