This is something I have wondered about at times. I have seen some fans claim that M dying was necessary for the story being told in Skyfall (particularly the idea that she "deserved" to die or to be sacrificed due to all the mistakes she's made), and I can see that POV. On the other hand, I know some people don't care for the ending - Anthony Horowitz in particular lamented: "The villain wins. The villain sets out to kill M. The film finishes with the villain killing M. So why have I watched it?"
I personally don't care much for M dying - the development kind of turns Skyfall into a Very Special Bond Film, you know, the one we all remember as The One Where M Dies. The event gives M a bigger role in the story than the character needs (these are Bond films, not M films), and it's hard to see how either Bond or M have won the day at film's end. I also think it was unnecessary to kill off another female character for the sake of adding to Bond's man pain (this happened with Craig once already in CR).
So could Skyfall have worked without killing off M? Here's how I personally think it could have worked: M is injured and uses the opportunity to fake her death, giving her an opportunity to leave the spy game and let Mallory take over as M. This would be a symbolic "death" - M's disappearance would echo Bond's disappearance in Turkey, and the film would get a happy ending.
Sequence of events would be something like... M is injured, bleeding out at church / MI6 agents arrive at Skyfall in helicopter / Fade to black, suggesting M has died / Cut to Bond on a deserted airport tarmac at dawn / Car pulls up, driven by Moneypenny, M exits / Bond says "Not many of us get to leave this cleanly," M gives bulldog statue to Bond, says goodbye / M boards a plane that flies away. Then cut to MI6 where we see Moneypenny in her office and Mallory in his new position. Film ends as usual.
What do you think of this idea? Would you enjoy Skyfall more if M lived? Or do you think M dying is an essential part of the story?