Their stock valuation counts on them taking 60%+ of the global car market, and their cars being a computer network that generates new revenue from software improvements in perpetuity.
I have some doubt cars will be their primary source of revenue in the long run. They are also an energy company and soon to be insurance. I also don't think Tesla bot is a joke, Elon seems pretty serious about outdoing other companies for household robots (re: his comments at #codecon)