Craig's Bond returns from the Bahamas, full of admiration for the Aston Martin DB5 he has driven. He gets talking with the Quartermaster (The pre-Whishaw model, perhaps Major Boothroyd or even John Cleese's Q), and learns of the ridiculous experimental cars that MI6 used to build - some of which used the old DB5 model. Upper management orders these cars to be destroyed to avoid unpleasant publicity of wasting public money (And plus- "We don't really do that anymore"). Quartermaster can't bear to destroy these beloved engineering marvels, so he agrees to sell the DB5 to Bond, and fix the paperwork so it looks like the car has been done away with.
This explains why Bond has the car, why M knows about the ejector seat button. It immediately suggested itself to me as a theory during the film, and I don't think the film-makers have to put this level of information into the dialogue.
Interestingly Raymond Benson goes on a similar line, and establishes in the Man with the Red Tattoo that Brosnan's bond bought his DB5 from Q branch.
Edited by JLaidlaw, 24 November 2012 - 04:37 PM.