I feel bad for both sides in this. Google can be put under so much pressure by the government, they are basically forced to do what they says; yes they can fight it, but if the government wants something badly, they will get it, they have powers
Or they could implement end-to-end encryption for many of their products and they wouldn't be able to give the government the data, even if they wanted to. But that would hamper them to analyze data for ad targeting.