They already have a bunch of tooling to make it easy for users on VSTS to ship their software to Azure, but VSTS users are probably 100% already in the Microsoft ecosystem.
Buying GitHub and then adding tooling to make shipping from GitHub to Azure easy (and the obvious choice) would help them push Azure more to companies not currently using other Microsoft products.