Sure we can hope, but in reality if Google is not profitable someone else will take its place. If Google does not cooperate with Chinese government someone else will take its place.
Will humanity benefit if, say, Comcast buys the morally pure but financially struggling Google, or if no one is challenging Baidu in China?
As long as Google cares, it is a net win for humanity. Even the worst-case scenario that Google is later bought by an immoral company is a better outcome for humanity than Google immediately becoming immoral.
I also find your argument about Google becoming unprofitable unconvincing. They were very profitable while they held the standards high in the past. Maybe not maximally profitable, but very profitable.
Will humanity benefit if, say, Comcast buys the morally pure but financially struggling Google, or if no one is challenging Baidu in China?