Well, it's not a story, any more than it is Guild Wars (for example) - the type of story that comes out of the playing, if there is one, might well be 'how the hero(es) failed and died', sure. Or anything else. It ain't written, and that's a large part of the beauty of RPGs.
That in effect makes it a story. It's an oral story, told at least once (surely you've sat through a few other PC stories).
The DM chooses what happens next, the players choose how the PCs handle it and move to the next scene. Once the game is done, you've just told a story, though during the game play, that may not be obvious.
Regardless of how the GM runs the game, what happens at the table is effectively a story. Since it is a story about you, and you like things about you, you will find it more interesting than it may really be. But it is a story nonetheless.
Anytime things are going easy for the players, or they make a mistake, the GM brings in a complication. This is standard storytelling methodology.
This is also the heart of the debate of resurrection and death. It affects the way we think of stories working, which affects the challenges and obstacle the hero faces.
If PCs have full plot immunity, or if rez is too common, then death has no meaning, and there's little risk (fear of death) to temper people's actions. The death of any NPC has little meaning, because if he "matters", he can be brought back. And the PCs know they will eventually beat the villain, just as I know I will ultimately finish Marvel Ultimate Alliance. I can't lose, because I can always reload.
This thread and others have talked about the wonkyness that can happen in a game world if you actually apply the common availability of ressurection. Conversly, most fiction doesn't even acknowledge this, because it hurts our verisimilitude and makes it harder to present obstacles and threats.
The core then, is to make it less likely to happen for NPCs, and accept it may be used by PCs. Smooth things out, so your stories make sense. Or fully embrace it, and get a radically different game world from our own. That could be fun, too.