Ads are a super intensive workload with super low margin. It'd be more correct to say that google built a very efficient platform that can run anything. Well, anything easier than ad, so almost anything.
Can add to that, I worked for a few months in a small mobile ad network and the throughput of that was insane for the size of the company. Also a shitshow of a company on many levels.