All those companies (and many other large tech companies) have discovered the same arbitrage that older media companies discovered decades ago, which is that we, on the average, are much more willing to pay with attention than with money, even where money would have been the better choice.
Advertising continues to be one of the most powerful business models ever invented, and I don't think that's changing any time soon.