I see those as two orthogonal things: solving problems for the web is the thing Google lives to do. Monopolizing internet advertising is the thing Google does to live.
Edit: This and my previous posts are very toxic towards Google. I shall try to be more positive. Maybe they really are doing good for the world. I mean, how will we have selfdriving googlecars if we don't have ads?