Google is very committed to GCP and you see it in their work. Much like Amazon, they have a huge sum of computing capacity they aren't always using. It's an obvious business play.
But what's more, it's become the basis of differentiating their mobile platform. Google is trying to develop and sell-for-cheap the tools to make really good mobile apps (e.g., Firebase) to try and shore up the app ecosystem of their platform.
Given that a lot of the things they offer are 3rd gen variants of their core tech for developing things internally, it seems fairly reasonable to assume they're in this for the long haul.