I wouldn't say game devs are afraid of giving a story a bad ending, and there are loads of games who have a bad ending, or at the very least ambiguous...
Off the top of my head: Unreal, Shadow of the Colossus, Painkiller, the first two of the Pop Sands trilogy, Golden Sun (though it was a setup for the sequel/second part of the saga, but still), Silent Hill 2, and maybe the pinnacle of depressing endings would be Crisis Core.
If you played FFVII prior to Crisis Core, you'd know that Zack Fair dies. It's pretty much common knowledge. But right before the ending (between the final bossfight, and the ending cinematic), you are given control over Zack once more in normal combat gameplay, but with infinitely respawning enemies and artillery all over the battlefield. You can't do anything but die, but the game made you want to break the barriers and change his fate. It was so damn depressing to see him die after that, even after trying everything you could, thus making it so much more powerful.
Shadow of the Colossus did the same, but with letting go (and the entire game is built around this concept).
A bad ending doesn't ruin the story for me though: if it's done right, it's just so much better.