Simple, someone gave them money at that valuation (softbank). It doesn't mean the underlying value exists but it does give them that "valuation"
This whole ordeal was the best that could happen for the normal people, basically fell into the hole they themselves dug, because the economists etc. called their bullshit out loud.
If you have not already, these are good reads from one of the critics of the whole scheme:
1. WeWTF - https://www.profgalloway.com/wewtf
2. WeWTF, Part Deux - https://www.profgalloway.com/wewtf-part-deux
In this case it turned out they were the first and final fool and they were left holding their own bag.
And thus they essentially sacammed themselves(or really their investors) out of billions.
You'll also hear this referred to as a pump and dump. Pump up the value of some asset and then dump it on someone else.