Providing cloud computing services is bulk business where the economies of scale is important Google is itself cloud computing company. When they sell resources to others, it's way to become bigger and reduce cost margins for the platform they are using for themselves.
As long as there are people who pay more for the Google cloud service than Google's own usage is worth, selling to others reduces the overall costs of computing for Google.
As long as there are people who pay more for the Google cloud service than Google's own usage is worth, selling to others reduces the overall costs of computing for Google.