There's been a few stories about the fact that Google was also interested in buying GitHub. I think the GitHub CEO felt Microsoft would be a better fit for them.
Google invested early in Gitlab. I'm not saying you're wrong, but they've been in this space for a long time already.