It's paid by advertisers. Docs and mail are just the Trojan horse to get you to use Google for searching.