How does he keep his job? By being exceptionally useful? You might as well ask why he wasn't fired after Licence to Kill, or Quantum of Solace or any other film where he goes rogue...
How was he useful in this one?
His licence was revoked at the beginning of Licence to Kill, hard to be fired after you've already been fired. And then, he WAS pretty useful in that movie, he did bring down a big ole drug kingpin... So it makes sense to bring him back.
It seems like most of the time he goes rogue, he succeeds...
Or how about Casino Royale where he loses Le chrifre, loses the money, and loses the girl! I have no problem with 007 being fallible.
I have no problem with fallible. But didn't at the end of Casino, he actually did damage to the organization? Don't remember. And him losing the girl, just like in OHMSS...
I don't mind Bond suffering personally, especially to succeed professionally, it makes him tragic and compelling.
And as for getting M killed, as I said before, it's pretty clear she wanted it that way - to go out while in the field, face to face with the enemy, rather than be pushed into retirement.
I'm sure her Majesty's government is glad that she got her wish...
In the end, as I've said throughout this thread, I think Skyfall looked GORGEOUS and has great actors. Just a truly shitty story. Well, the plotting. The plotting is awful. I just don't think I can be dissuaded from that position.