Investors do throw a lot at those companies - but mostly to cover running expenses.
The billions they use to buy up other companies come mostly by using shares, valued at a certain amount. E.g. a smallish company issues say 10,000 shares, sells 100 of them at $100 each, raising $10,000 cash. The rest of the stock, those 9,900 shares, are booked at $990,000 total.
Next thing you hear, company A buys up company B. They use 5,000 of their shares to pay for it, valued at $500,000. So they buy the company for $500,000! Or do they? Well, the ones that accept those shares now have a share in the new company - but good luck selling them for cash at $100 each...
That's what Facebook et.al. are doing. Just add a bunch of zeros to the numbers above, I kept it simple for readability. Now would our example company go bust, they may wipe out $1,000,000 in value, but investors stand to lose only $10,000. So nothing much lost, really. Makes it easy to inflate bubbles, easy to pop them, and all with little impact to the economy at large.
This of course in contrast to the recent banking crisis, where real money was lost. Lots of it.