In the 90s, MS attempted mobile devices using Windows CE (based on Windows 3.1—long after the release of Windows 95) and that went nowhere. Microsoft has always been the first for the longest time they were incapable of building things people genuinely wanted to buy.
If Apple didn't make the iPhone or iPad, all MS could do is rip off Blackberry. They wouldn't have made anything worthy of spurring the mobile industry we have today.
And Apple didn't really need that $200M from MS. Instead the investment had more symbolic value—signaling that Apple was still a viable company that had software support from the biggest tech company of the day.
Also, before Steve Jobs returned to Apple, Larry Ellison wanted to buy up shares for a hostile takeover and then install Jobs as CEO, but Jobs talked Ellison out of it.