I don't think Google sees itself as an opponent of Trump, but Trump certainly acts as if Google is an opponent (cf. https://twitter.com/search?q=from:realdonaldtrump+google), and that's what matters here. I don't think it particularly matters whether Google really is an opponent of Trump, either.
(My personal opinion is that Google is much less of an opponent than Trump claims, but also, since politics is not a dirty word and the existence of a giant multinational corporation is inherently political even if it weren't for all the things that make Google Google, it would be entirely reasonable for Google to choose to be more of an opponent than they are - and it still would not make me feel like selective enforcement of the laws is justifiable.)
(My personal opinion is that Google is much less of an opponent than Trump claims, but also, since politics is not a dirty word and the existence of a giant multinational corporation is inherently political even if it weren't for all the things that make Google Google, it would be entirely reasonable for Google to choose to be more of an opponent than they are - and it still would not make me feel like selective enforcement of the laws is justifiable.)