Humanity is often its wittiest when things are at their worst. It's a basic response to death, I believe.
Which is why humor and Really Bad Things (tm) so often go hand in hand, and defines a sense of gallows humor. M*A*S*H was all about gallows humor, and in fact, the medical profession itself is full of it. Most people look at a surgeon with a bit of awe and fear. This is a person whom you're entrusting to carve you up like Thanksgiving's turkey. You expect them to be somber. Serious.
Wait until you're unconscious. If your bones stink more than is expected when the bone saw is a'workin' on you, you're going to be the butt of a joke or two. It's got to be done, a joke must be cracked. That smell (and sound) is nerve wracking, not to mention gross. I hope you never have to find out.
The one time I found myself in a life threatening situation--my own life, that is--was during a visit to Carlsbad Caverns. A friend and I had hiked the whole way down, took the tour, had a little snack, and then took the elevator back up to the surface. I'm not sure of the length of the elevator shaft, but the deepest cavern in the park is about 1600 feet. That's taller than the tallest building in the world...
The elevators were large and speedy, manned by a US National Park Ranger. The car my friend and I boarded was fairly full.
Thus, it dropped quickly when all the power in the caves, including the elevator, suddenly shut off. Thankfully we were closer to the top of our ascension rather than the bottom.
We didn't drop very far, but it was terrifying. Lights were flickering. The digital display telling us how far we had risen turned into a nonsensical display of imminent doom just like in the movies. People were screaming. A big jolt rattled us when the car finally halted.
All in all, a really tense situation. Even the ranger was scared: he fumbled the emergency phone, and his voice was pushed up a couple of octaves by terror. When he made a request for a pizza to be sent down to us, it sounded very rehearsed. As I'm sure it probably was. A woman panicked, hyperventilating and demanding that everyone stop breathing. She soon regained a bit of composure and started sobbing quietly and everyone was a bit disgusted with her outburst, though I think everyone was really just a bit jealous that we didn't have it in us to just collapse like she did.
I turned to my friend and said, sotto voce, "Well, this will be a story to tell our grandkids, eh?"
Our lady friend found the strength to shriek, "If we ever HAVE grandchildren!"
The ranger, in an amazing comeback popped off with, "Lady, I have every intention of getting out of here and having grandchildren. I'm going to bore generations of my family with this story."
That did the trick. The tension, and sense of near hysteria broke. People laughed, and re-affirmed their status as living beings. Even the hysterical woman managed to give a weak chuckle for the team. And fifteen minutes later, we were back on terra firma. Apparently a freak storm had taken out both primary power and the generators at the same time. We were all given a free meal or something by the Park Service, and went our separate ways.
The experience taught me a valuable lesson. The ability to laugh, even in the worst of situations, indicates just how much we value humor. At some deeply ingrained level, our ability to laugh reminds us just how deeply we are alive.
If there's a heaven, it's got to be stuffed with comedians.