As I recall being told, the M&P pistol project was created to help put S&W back in the running for the LE market, as well as to be able to put out a plastic pistol over which they would have complete control when it came to design and manufacturing.
Up until that time they'd only had the Sigma (which actually sold quite well for the budget-minded shooters, but didn't do much for attracting LE customers), and the SW99/990L, for which they only made the bare slide & barrel, getting (buying) everything else from Walther.
The 4-year M&P pistol project started with a blank sheet of paper, as it were, and S&W solicited a lot of input and feedback from military & LE sources. They apparently wanted to put everything they'd already learned to good use, and make some further innovations, improvements and refinements they felt would offer them an advantage in the LE market.
The M&P was designed around the .40 S&W cartridge, first and foremost, since that had become the dominant LE caliber. They also planned to release it in .357SIG (which is the second gun they've chambered in that caliber, with a small run of Sigma MSW357V pistols previously being made).
The military announced the JCP proposal before the official Jan '06 release of the M&P series (about '05). The slightly larger M&P 45 incorporated some changes made in anticipation of meeting the JCP bid spec, including a thumb safety, using a roll pin for the extractor, as well as making the capacity 10-rds standard and with an extended 14-rd magazine optional.
As I recall, the intended order of release was the .40, then the 9mm, followed by the .357SIG and lastly the .45 model. These were all full-size, with compacts following for the .40/9/.357 calibers, and then with a compact and a "medium" model for the .45 caliber.
I think it was sometime after the Jan '06 release of the M&P series that the military announced the JCP was being suspended, canceled, or whatever ... so S&W had a "dual" .45 model ready to go, with & without a manual thumb safety, in 2 frame colors, and only the commercial/LE market in which to sell it.
As was previously mentioned, S&W wasn't the only major company that had been quietly prepping new or revised .45 pistols for the anticipated JCP, BTW, and we've seen a flood of new .45's released since then.
Naturally, the idea of a thumb safety (created for the JCP spec) created a bit of a problem for S&W once the M&P 45's hit the market, because then suddenly lots of customers wanted the same option in the other calibers. Go figure.
At least they went ahead and incorporated the use of a roll pin for the extractor pin in the rest of the line after a while. Much easier for service/replacement than the "feels-like-it's-welded-in-there" solid pins.
(It's not generally known, but they also FINALLY offered roll pins for the 3rd gen models, after a long time of saying they weren't available or could be used. No part numbers, and armorers have to call back and ask for them, I'm told, but I haven't gotten around to adding any to my parts. I have enough solid pins and have gotten used to banging them in & out.

)
I remember they did an excellent job keeping the M&P under wraps until close to its official introduction.
