Also, Google had a Gitlab/Github-style page until a few years ago, called Google Code. Obviously, they weren't interested on that venue anymore.
Because Github and Gitlab was eating up the userbase left and right. The utter lack of any progress/development on Google Code itself was the nail in the coffin driving people away.
I also doubt it made any revenue
There’s a big difference to Google execs between technological and commercial success. It must be very, very interesting to be a fly on the wall of their high level product management meetings.
Why?
Gitlab is actually open source. Although we actually pay money to Gitlab for support since it's so cheap. We run our own instances and would be fine even if a FAANG bought it and killed it.
The ability to self-host is actually one of the differences between Gitlab and Github.