gmail (and any other web based email) needs to "read" the email content to provide a search function. If the same program also uses the content to pick some ads from the inventory then I'm personally ok with that.
That is different from searching them for illegal material based on what illegal implies at a given time and location.
That is different from searching them for illegal material based on what illegal implies at a given time and location.