Well, they do also sell data access to governments. The argument when the government requested data from them was “we aren’t set up for this, it will incur significant expenses, we’ll have to develop solutions then set up and staff a department to handle requests”, which the government paid for. It’s not directly purchasing the data, but it is effectively.
I’ll be honest, I’m still tired from last night lol, too much so to go digging. We’re also talking about something that has been the norm for more than a decade now - Google have long since established their processes for dealing with government requests. This may have started sometime around 2012, perhaps even earlier. I probably read it in an Ars Technica article, at a guess, but it could also have been something I stumbled upon on reddit.