You're misunderstanding this. They added GitLab and Bitbucket in Xcode 10, but Xcode 9 already had GitHub integration. These two are being added in addition to GitHub.
Apple probably planned that long before the announcement of Microsoft's acquisition was made because a lot of customers requested gitlab/bitbucket integration after they added the github integration. But they could only tell that they public after they released xcode 10 at the WWDC yesterday. It was just unfortunate that the WWDC and the announcement were within ~24h.
I don't know if i'd go so far as to call it a tacit endorsement of gitlab by Apple, but it does have an air of opportunism.