Governments can just ask for it and Google has to give it to them. [1][2] In fact the US Government has decided it is easier to have the service providers collect data for them and then just get it when needed instead of them separately trying to "archive" data.
[1] https://www.justice.gov/archive/ll/highlights.htm
[2] https://en.wikipedia.org/wiki/United_States_Foreign_Intellig...