Actually, it was not always part of the deal. Back when i signed up for the service, it was still in private beta. They had a cheesy little counter with how much space you were granted (1GB to start with). Terms of Sevice were an afterthought, and sure as hell there was not a clause to sift through your mail. I remember when they put that clause in their ToS finally a few years later and it was a HUGE deal.
And look where we are now. Not only is it expected (!!) but people are telling us to suck it up, this is how it’s always been (it wasn’t) and it’s our own fault because we didn’t read the ToS. When did this become the norm, and when did it even become acceptable??
Whether or not you realized how the information could be used, you did consent for Google to have that information by choosing them as your email provider. Anyone with a modicum of understanding of how email works would realize that the content of any unencrypted email is readily available to the entity which receives and stores the email, along with the sender's email provider and the operators of any services it might pass through prior to final delivery. If anything this is even more obvious with webmail services. The only reason people are upset at Google here is that Google is more up-front than the average free email provider about the extent of the information they have and how it can be used. They didn't have to reveal what they know or provide controls over it or use it to offer services for their users' benefit. Sure, they also use it for advertising—but that was always part of the deal, since long before any of these other features existed. Yet it's these aspects that benefit the user that people seem to complain about the most, because it highlights aspects of the relationship they wouldn't otherwise have bothered to consider.