Google does have a right to scan GMail according to the TOS that everyone was forced to accept in March of 2012. The problem with that is very few people read a mile-long TOS and they were automatically opted in if they tried to ignore it.
The intent of the TOS change was obviously to avoid losing law suits like this one. Way back then I said that the change was intended to cover their little asses due to their relationship with the NSA and a secret program that was spying on Americans.
I should probably stop talking about this. There is a black helicopter hovering over my home tight now.
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin