In both situations, the audience becomes tense and the comedian becomes burdened with trying to ease the unforeseen tension in the room for the person who lives in whatever time period they thought talking during a live comedy show was OK. The fact that it happened and had to deal with it and got laughs really means they were derailed from doing something that was probably going to be much better and, more importantly, planned.
Heckling is not OK. It’s never OK in case you’ve been reading a certain article that’s floating around recently that says it might be OK if the comedian handles it expertly when “shit got real” that we won’t link to here.
The reason that live comedy is best enjoyed in a cramped darkened room with a small stage is that jokes require a level attention devoid of every single distraction. That’s why comedians complain about how the tables and seats are arranged, what color of bulb they’re using for the light to signal to get off stage, how high the ceilings are, the check-drop, where the bar is in relation to the stage, etc. etc. Comedy is so nuanced that every aspect of it has to be highlighted and attention to anything else has to be non-existent.
Unless there’s a show called the audience participation show or it’s boldly stated in the show’s description that you are encouraged to talk during the show, then don’t do it. FYI, we saw a show like that a few years ago where everyone in attendance was encouraged to talk and it was one of the worst fucking shit shows in the history of shit shows.
If you want to talk during someone’s set, yell at your computer at home when you’re watching YouTube clips of their stand-up. If that sounds ridiculous, that’s because it is, no matter where you are.