Advertising on web pages requires them to track everything you do and play the ads accordingly. Lots of overhead, and they can never be sure it is targeted correctly. Advertising in gmail allows them to just scan your email.

It's how they compete with MS directly, killing Exchange boxes.

It is an income stream in itself, with LOTS of paid customers.

And MOST important, if they make noises about it going away, the NSA will force them to keep it.

It's not going away.