I think your underestimating the INSANE amount of vision and foresight that would be required to do this in 2005.
1. The xbox 360 was released in 2005. This was essentially the first Microsoft console to run 'apps,' and those had to be architected specifically for the console.
2. The iPhone was years away in 2005. Phones ran shitty little apps that had to be architected specifically for the phone.
3. The iPad was years away. Microsoft tablets just ran XP. The idea of the iPad as a "bigger iPhone" was mocked to no end when it was announced. People thought they wanted OS X on a touchscreen. Microsoft would have thought the same thing.
4. gMail has just been released. The idea of a true "web app" required remarkable vision and foresight by itself. Additionally, web apps had to be architected specifically for the browser (seeing a pattern?).
Even if Microsoft had seen 5 years into the future and predicted all these changes, the platform they would have created in 2005 wouldn't have had anything to run on.
The idea of a centralized "app store" was not new. People had been complaining about Windows not having Linux-like package management since the 90s.
Similarly, the idea of web apps taking over everything was not new. Microsoft was acutely aware of that, since that was Netscape's big idea (also Java was in theory the same threat - write once, run anywhere, make Windows unimportant). Again, all in the 90s. This is the most fundamental answer as to why MS didn't do this stuff before. Not because of a lack of foresight, but because their foresight was good enough to allow them to identify it as a threat to their monopoly.
Touch screen phones/tablets I agree were less obvious predictions, but even if MS did figure that out early on, it wouldn't have changed their motivation to fight back against Netscape and Java and similar technologies.
Microsoft had an application store in Windows XP. Remember "Find applications"? They had an online store of sorts that listed programs, but nobody bought anything on it because there didn't appear to be any vendors on it, and CD-ROMs were all the rage back then.
App Stores have only really taken off as Internet speeds have sky-rocketed. That was not the case when XP was released; everyone was on dialup or barely slow ISDN if they were lucky.
Good points, but it is also worth considering that in 2005, Microsoft had a much stronger position in the Smartphone/handheld market with Pocket PC/Windows Mobile. Even looking at how they named their mobile os makes you think they should have been thinking about cross platform apps. Those phones felt a lot like tiny PCs, which was also their weakness.
1. The xbox 360 was released in 2005. This was essentially the first Microsoft console to run 'apps,' and those had to be architected specifically for the console.
2. The iPhone was years away in 2005. Phones ran shitty little apps that had to be architected specifically for the phone.
3. The iPad was years away. Microsoft tablets just ran XP. The idea of the iPad as a "bigger iPhone" was mocked to no end when it was announced. People thought they wanted OS X on a touchscreen. Microsoft would have thought the same thing.
4. gMail has just been released. The idea of a true "web app" required remarkable vision and foresight by itself. Additionally, web apps had to be architected specifically for the browser (seeing a pattern?).
Even if Microsoft had seen 5 years into the future and predicted all these changes, the platform they would have created in 2005 wouldn't have had anything to run on.