One of the posters here has one of the top ten greatest .sig's of all time. It starts by some professor quoting astronomical odds against success, and the professor goes on to say something like, "What kinds of people go into battle against those odds?"
The answer given is, "Heroes, professor. Heroes."
A hero is someone who goes into a dangerous situation and does the right thing anyway, despite the fact that it means death or bodily harm. This is why we call firefighters and policemen "heroes." It's why we call some military personnel "heroes." (depends on the time and situation, but most of us have had military people in our countries' pasts that fit that bill.) The trapping of D&D as a game, can dilute that somewhat, because in order for someone to be a hero, there must be an element of risk or loss involved. The D&D game's challenge rating is built so that an average encounter will most likely not kill you; you will survive almost all D&D encounters at your challenge level with low to no risk - after all, where is the fun if you are rolling up two characters at every session, JUST to make it through the session?
However, the element of risk for a greater good is what makes games like D&D fun to play. Sure, we have comedy games, we have dark and gritty games like CoC, but most people can only take so much of this in repeated dosages, before getting tired of it. I know that if I GM too many sessions of CoC in a row (say, about 15 to 20 sessions of it), I start to actually depress myself. After all, my creative processes go something along the lines of,
"Let's see, what new perverted and mind-numbing horrors can I come up with today to spring on my players?" You need a break, and part of that break is ouright heroism.
Now, heroism requires risk of loss, and the more powerful a threat is that the players can validly defeat or outwit, the greater the thrill of victory. What do players remember more fondly - the time they rescued 20 slaves from the Slave Lords, or the time they suffered a Total Party Kill in the attempt? It matters not if they were captured, got thrown in a cell, and were beaten severely - as long as they get that emotional payoff that comes with ultimate victory. But if they are scripted to do so, then the victory is hollow. It's a fine line, but one that a DM must walk to help create some of the best gaming sessions that are remembered for a long time.
I once had a playing group that played very unwisely, and as a result they lost three of their number to thugs. Two of the three were returned after having a part of their bodies removed as penance, and the third was returned - though only his eyeballs. Two regenerations and a resurrection later, all the PC's remembered that event poignantly, but as a monument to playing more carefully, and they learned from their mistake.