They produce great cars that people love, but people generally love high-end very expensive cars.
A Nissan Leaf is not as nice of a car as a Tesla Model 3 in pretty much any way, but it also costs 3/4 of the price. Meanwhile, the Leaf is profitable per-car, and the base model Tesla Model 3 is barely break-even per-car, even with the very aggressive accounting that Tesla uses. Tesla can't keep producing base Model 3's at the price they are selling them for (even at over $40k), they are a loss leader to look competitive on price, the profitable version is well over $50k without government subsidies that will end this year (and the performance model is over $60k). A leaf is around $30k.