Question: why does a person get defensive?
Answer: People who are acting defensively are essentially trying to protect themselves from feeling a certain uncomfortable way, and from viewing themselves as a failure or otherwise in a negative light. In this light, all of your examples are potentially reasonable examples of defensive behavior.