Do you really believe a snake feels anger as you feel it? That could mean that a snake would involve higher comprehension and reasoning akin to mammals and avian. I do not believe this is the case and we should completely avoid anthropomorphizing snakes and other animals.
Could the snake have been upset and distressed by your intrusion because it felt vulnerable? Then feeling vulnerable and under duress it can certainly defend itself?
That follows the simple logic of snakes can feel secure, or insecure; fight, or flight.
Avoiding putting human emotions such as anger on an animal that does not have those higher thought processes and reasoning skills.