WhatsApp purchase was for that sweet sweet data of everyone's contact lists (this was their original innovation for onboarding — just give us access to your phone book and we'll tell you who else is on WhatsApp). Their earnings were completely irrelevant in price discussions. The billions were paid for the dataset.
How do they spend insane amount of money in targeted ads and all the ads I get are useless?
I constantly get ads to learn how to code. Ok I've been doing that professionally for over a decade and I have a real degree from a real university… why would I do some online programming course?