Performing is a very stressful feat. Just as you recall your nervous jitters as you get up for a presentation in front of a couple dozen of students, you can imagine how it is for performers. Unlike a presentation, there is no room for error when performing. The performance is usually the passion of the performer, and everyone wants to be famous.
We humans have coping mechanisms to help our mind function normally. This is why we sometimes cannot take criticism. A heckler at a performance is attacking the skill that carries the performers hopes and dreams. It is natural to get highly defensive, especially when confidence is not all that high yet.