I believe the answer to this question is a strong maybe. I would say (with no type of evidence at all) that 99% of the time the heckler is in the wrong. Heckling is almost always a very selfish thing, with the heckler trying to get attention or impress their friends, etc. It also involves too much alcohol most of the time, I’m sure. Another possible reason for heckling that I think maybe Maggie Farris mentioned to our class was that the heckler thinks it is actually beneficial to the comedian. It can be anywhere from amusing to very funny to watch a comedian destroy a heckler, but overall it must just be very obnoxious for the comedian. It’s not the fact that the heckler actually “wins” the confrontation or makes the comedian look bad, but it just must be very distracting for the comedian, and inhibits them from going through their material as smoothly as they wanted to. It can also disrupt the flow of the comedian’s set, getting them off track or breaking the audience’s attention or immersion with the direction the comedian was taking. It is a lose-lose situation; the heckler embarrasses themself (and maybe gets kicked out eventually) and the comedian has to take a detour from their routine and possibly waste a decent portion of their allotted performance time.
Even if the comedian was completely bombing their performance, I think it’s still not appropriate to heckle. It’s just disrespectful and uncalled for. The one scenario where I can see heckling being appropriate is if the comedian is being blatantly offensive or just taking something way too far and most of the audience is in agreeance with that fact. I don’t have a specific example of this but I could see something similar to that going down.