Here is a crazy concept. Snakes have the brain about the size of a pebble. When something bothers them even slightly, the brain reaction time is very fast and a response may come out even if the snake is still not fully aware of the situation.
If you did not get bit I would not worry too much. Animals are animals and we can not always understand what they think or how they will react. Simply be careful and pay close attention to the warning signs. I get a hiss every now and then from all of my reptiles (never open mouth) that is just their way of communicating.
Here is some fun reading for anyone trying to understand how brains work. The test was done with humans because our behaviors are the first scientist want to understand.
ABC News: Women's Brains Better at Handling Anger
Then what will really bake your noodle is look at the r-complex and it's functions in humans then compare it to the brain of any reptile
