On Thursday, Tesla stock rose above $400 for the first time in the company's history. The record price caps a year—and a decade—when Tesla proved its doubters wrong.

At the start of 2010, Tesla had produced fewer than 1,000 units of the high-priced Roadster. The Model S was years away. The firm's finances were still precarious, having narrowly escaped bankruptcy in the final days of 2008. Few would have guessed that Tesla was poised to become a major automaker.

Indeed, over the last decade, people repeatedly predicted that the company would run out of money and be unable to raise more. They doubted that Tesla could deliver new car models on time—or at all. They said that quality problems and missed deadlines would sour customers on the Tesla brand.

But Tesla has proved these critics wrong. It's true that the company has repeatedly missed deadlines and has sometimes shipped cars with quality problems. But those setbacks have had little impact on its customers' enthusiasm for the company. Compelling features like instant acceleration, over-the-air software updates, and Tesla's vast supercharger network have been enough to convince hundreds of thousands of fans to overlook the company's flaws and open their wallets.

As the 2010s draw to a close, Tesla may be in its strongest position ever. The company recently began production at its second major car factory in Shanghai, and it has begun work on its third car factory near Berlin. Tesla made a small profit in the most recent quarter despite falling government subsidies.

Tesla still faces plenty of challenges. The company is supposed to start shipping three new vehicles—the Model Y SUV, the Semi, the New Roadster—just in 2020. That doesn't seem like a realistic timetable for a company that has launched only three new vehicles in the last decade and has never launched a vehicle on time. But Tesla does eventually ship its products. And so far, customers have always loved them.

Rumors of Tesla’s bankruptcy were greatly exaggerated

Car manufacturing is a hugely capital-intensive business. Tesla has had to raise billions of dollars as it shifted from selling a niche sports car at the start of the decade to selling the mass-market Model 3 in recent years. Meanwhile, the company's stock soared from a 2010 IPO price of $17 to more than $100 in late 2013 to more than $400 today. That has made Tesla a favorite target of short sellers—investors who try to make money by betting a stock will go down.

"It's an overpriced car company," said Jim Chanos, a short seller who made his name predicting the demise of Enron, in an October 2015 interview. At the time, Tesla's stock was selling for around $220.

Yet Tesla continued to borrow heavily as it developed the Model X and then the Model 3. And despite the negative cashflow, the company's stock kept going up.

Pessimism about Tesla's financial viability may have reached its peak in April 2018, when Bloomberg published a feature called "Tesla doesn't burn fuel, it burns cash." The article was accompanied by a crude animation of Tesla head honcho Elon Musk throwing a stream of dollar bills into a pair of flamethrowers. At that point, Tesla was burning more than a billion dollars in cash every quarter as it ramped up production of the Model 3. People wondered if Tesla—which had only seen a handful of quarters with positive cashflow since its 2010 IPO—was on the verge of bankruptcy.

This was also the time period when Musk tweeted that he had "funding secured" for a deal to take Tesla private at $420 per share—something that turned out not to be true and got him in hot water with the Securities and Exchange Commission. Around this same time, people started to compile long lists of senior Tesla executives who had left the company in recent months. One September 2018 tally from CNBC counted 41 executives who had quit since the start of the year.

All of which caused many people to suspect that Tesla was in serious financial trouble. But that turned out to be untrue. Tesla turned a profit in both the third and fourth quarters of 2018. Tesla lost money again in the first two quarters of 2019, but Wall Street was unconcerned. Tesla had no trouble raising an extra $2 billion in a May 2019 stock sale. That fundraising round helped to put Tesla on a firm financial footing going into 2020.

Why I’m bullish about Tesla in the 2020s

Critics have focused on Tesla's negative cash flow over the last decade—but many seem to miss the larger picture. Car companies have to spend billions of dollars in design and factory construction costs before the first car comes off the assembly line. That's exactly what we've seen for each of Tesla's last three vehicle launches: big losses in the months before the start of manufacturing, turning to modest profits once volume production is underway.

Of course, skeptics (including my colleague Jonathan Gitlin) point out that there's a ton of red ink on this chart and comparatively modest profits. And Tesla has juiced its profits by selling zero-emission tax credits to other automakers—a revenue source it may not be able to rely on in the future.

Still, Tesla's losses are largely a reflection of the company's rapid growth. If the company had decided to rest on its laurels after launching the Model S, it likely could have enjoyed years of small but steady profits selling that vehicle. Similarly, if Tesla hadn't launched the Model 3, the Model S and X would have generated healthy profits over the last five years.

It's Tesla's decision to start production on a new car as soon as the old one starts turning a profit that has produced a decade of almost continuous losses. Not only that, but Tesla has been shifting from low-volume cars to high-volume ones. High-volume cars have much higher up-front capital costs. So it's not surprising that Tesla's Model S and Model X profits got drowned in a sea of red ink from the ramp-up of Model 3 manufacturing.

But there's a method to the madness here. While a mass-market car like the Model 3 has higher upfront costs and lower margins, it also has potential for big profits thanks to economies of scale. The Model 3 is cheap enough that millions of people can afford to buy them. And if they do, Tesla will easily make a healthy return on the billions of dollars it spent setting up its Model 3 factory.