When you buy a share you do not care about the profits in the past, you care that the company will generate profits and thus increase its value in the future. The only reason people care about past profitability is in how it can help you predict future profitability.
This is also the reason why companies can be generating losses quarter after quarter and still be gaining value -- as long as there exists expectation of future growth and profit.
And in case of Tesla a lot of this expectation of future profits and growth was based on charisma of its owner and on belief that he is the force behind Tesla's spectacular success.
Starting one successful company is impressive but can be partly attributed to luck. Starting multiple hugely successful global multi-hundred billion dollar companies is not luck at all, especially when you spend a moment learning about Elon's work ethic and his tight grip over everything.
Now, if you are an investor, it seems the owner lost its focus and made a bunch of questionable decisions. This puts a huge question mark on whether he will be as involved and as effective with Tesla in the future.