I was brushing up on the latest episodes of South Park when I came upon E12 S15 "1%". It struck me as one of these episodes where comedy takes the back seat and lets "tragedy" drive for a bit. The entire episode isn't tragic of course, but the ending has a heavy touch of pathos making the situation funny and something else as well. You rarely see Death in Sitcoms, although South Park changed that a lot, so when it shows up we aren't really comfortable. See, the Sitcom genre doesn't evolve or it does very slowly, so if you break it down, you'll see many times the same thing between series, seasons and episodes. Thus, we like Sitcoms because of the familiar feeling like we are part of the family, group of friend, town... in which the characters lead their lives.
So, when Death appears, since we are not used to seing it in Sitcoms, we don't really know how to feel. Some people laugh much harder, others cry... doesn't matter. What matters is the concept of reciprocity between our feelings and the feelings exposed in the episode. If a character is sad and that makes us laugh, then there is a reason for that opposite reaction, as there would be if if the reaction was the same.