It's because it wasn't you dying. We all know that life can end in an instant and when we see it happen to others we can either joke or be upset about it. I don't think anyone here would say that it was funny that he did die, but seeing as he did die what are you going to do? Joking about it is a coping mechanism.