The only advantage was static binaries, which not many other languages in a usable state supported at the time. It’s not even like there was an ecosystem at the time - HC had to maintain an AWS client for Go for several years, and similarly for Azure.
I guess it is up to Google to decide how to monetize Go, or who knows, maybe some day they will put it into a foundation of sorts that should find a way to keep sponsoring its development.
Following your example, Alphabet should open source all the weights they use in their current search algorithm as well as the algorithm itself.
And extending that principle, they should also open source the machine translation model and weights Robert DeNero made for them when at Google Translate.
Both of these are dumb hypotheticals but serve to point out the fact that there are loss leaders and revenue generators at each company.
Hashicorp doesn't generate revenue from Terraform.
(They do generate revenue from Terraform Cloud, but that's a backend for Terraform, not Terraform itself)