He certainly wasn't trying to kill you. Most likely he was hanging on for fear of falling and loosing his own life, same as he would a branch in a tree. It's a stress reaction.

-adam