Re-posting from Quora where this got a bit of attention.
To save the world. Yes, really! Let me explain.
Imagine a world with only one newspaper, only one TV news channel, only one brand of toothpaste, etc. Is that ok?
Now imagine a world with just one search engine for all your information? No alternatives, no second opinion. Is that ok? (hint Can Google Influence an Election?)
That's not the kind of world we want to live in. That's not the kind of world Microsoft wants to live in. So Microsoft decided to do something about it.
Sure, Microsoft is motivated by self-interest, because of something called the 'Supplier Hold-up problem' in economics.
Microsoft needs search/ML capabilities in Windows, Office, Xbox etc. If they had to buy it from Google, and there was no alternative, Google could charge whatever they liked and Microsoft would be forced to pay. (Remember the Apple-Google Maps showdown.)
So Microsoft has no choice but to build its own search engine.
That forces Google to keep getting better, which is good for all of us consumers.
More importantly it keeps Google honest, thus saving democracy and the free world and all that.
So there you have it - the Invisible hand in action.