Microsoft had a lot to gain out of the deal, too.