It came from the VCs
All that money they pour in multiple rounds of VC financing, a total of about $2.5 billion. Now they've cashed out for a big profit (especially the earliest rounds) but the company was able to sell new shares during the IPO. So they've built up some cash to survive a few more losing quarters until they figure out how to monetize their userbase.