Growth
This is the problem with the way markets are currently set up. Handing back excess money to investors is not an activity that the markets reward.
If Facebook started paying a dividend there would very likely be worried articles about whether it was maturing as a stock and its price earnings ratio would get hammered as the people it gave money back to dived for the exits.
By splurging it on investments that will almost certainly deliver ever smaller growth for ever larger amounts of money Facebook maintains its position as a growth stock until the market at some point decides that it isn't and the markets start to demand that it behave accordingly. By that point it may have wasted $20bn+ of the profits from its monopoly position on inane projects that quietly get dumped a few years later.
The recent Microsoft article charting just how much money Steve Ballmer has wasted is an instructive case in point, and Google are a few years further down the line from Facebook in doing much the same thing.