Not unusual for a startup to lose money while doing R&D and developing sustainable market share. I’m in one now - revenue is growing very nicely, even though operating costs were larger for several years; at some point you pass break-even and start raking it in. Losing $5k on a $100k car isn’t bad, so long as the losses are decreasing and sustainable market share is increasing.
Just think in 10 years the cars may only cost $50K and not do anything more than make Musk wealthy beyond compare.
It's even better when the federal government is willing to use its power to extort money from middle class working taxpayers and give to the politically well connected to establish the business, prop it up, and boost sales.