Tesla wants to sell its self-driving car tech to other car companies. At let's say $2.5k profit per vehicle if they could up-sell 10% of new cars that would $5B/profit a year.
There are a lot of other non-obvious ways Tesla is poised to potentially make its market cap downright sensible. For instance if Tesla owners started Ubering out their self driving cars in 2-3 years and Uber took a 33% cut of every dollar Tesla-Uber revenue they would be making billions. That's already worth $50B.
Eventually solar roofs will be a no-brainer cost/benefit choice for most of the country. That's a multi-billion dollar industry.
You have to view Tesla as a tech company with growth potential outside of folded metal. If you added up the market valuation of MobilEye ($15B), Uber ($51B) and a conservative Tesla Cars ($5B) you're already well in excess of their $50B valuation.
Meanwhile GM almost went bankrupt already once within the last 10 years. What are the odds they won't go bankrupt again in the next 10? Best case scenario GM is worth $10B/year for the next 10 years (probably less profit). Worst case scenario you're wiped out in bankruptcy. Best case scenario for Tesla they are cranking out $10B in profit a year (they already have 5x increase in reservations for next year than this last years' sales so that's a good trajectory), selling another $10B in self driving car tech to Ford and Nissan and Honda and Chevy, selling $5B/year in self-driving car rides, capturing 20% of the $144B independent semi-truck driving business with a fleet of self driving electric trucks... the list goes on and on. Or they like GM also go bankrupt.
The upside to Tesla is massive. The risk of losing it all is probably higher in my opinion for GM. Their last CEO went on the record calling Tesla a scam. Anyone who thinks Tesla is just a cash -> steel and wheels business doesn't get why they are valued what they are.
Microsoft used to be microscopic compared to IBM as well...