After surpassing Ford in value last week, Tesla became the most valuable car company in America Monday as it surged past General Motors. As I write this, Tesla is worth $51 billion, compared with $50 billion for GM and $45 billion for Ford.

At first glance, that doesn’t make any sense. Ford sold 6.6 million vehicles in 2016 and earned $4.6 billion for the year. GM sold 10 million cars in 2016 and earned $9.4 billion. Tesla shipped a comparatively tiny 76,000 vehicles and recorded a loss of $675 million.

The fact that Tesla’s stock is worth more than Ford’s and about as much as GM’s is a sign that Wall Street envisions very different trajectories for the two companies. Tesla CEO Elon Musk has set aggressive growth goals for his company, aiming to produce 500,000 vehicles in 2018 and close to 1 million vehicles by 2020. But even if Musk meets these targets — and that’s a big if — that still wouldn’t justify valuing Tesla more highly than Ford or GM, which already sell millions of vehicles every year.

So the relatively low market prices of Ford and GM seems to also be a signal that investors are pessimistic about these Detroit auto companies’ prospects. Many observers expect that over the next decade or two, the car industry will shift from human-driven, gasoline-powered cars to software-driven electric vehicles. Car companies believe they’ll be able to navigate this transition gracefully, but Wall Street doesn’t seem to believe it.

Wall Street sees Tesla, not classic companies like Ford and GM, as the future of cars.

Tesla is aiming to be the Apple of the car business

To understand what the market might be thinking, it’s worth remembering what happened in the cellphone industry a decade ago. Back in 2007, the cellphone market was dominated by Nokia with 435 million units, followed by Motorola with 164 million units. Apple released the first iPhone that year, but it sold fewer than 4 million units.

So it would have been easy for a naive analyst at the time to dismiss Apple as a minor player. What that analyst would have missed, of course, was that the nature of cellphones was about to change. The kind of old-fashioned “feature phones” that accounted for the bulk of Nokia’s sales was about to be rendered obsolete by the iPhone and a new wave of Android-based smartphones.

Nokia executives weren’t too worried. They didn’t have the iPhone, but they had plenty of engineers and strong relationships with mobile network operators around the world. They assumed they’d be able to build a rival smartphone operating system and be a major player in the smartphone business.

But making an iPhone-quality smartphone proved to be harder than they expected, and Nokia was caught flat-footed. Efforts to create its own software floundered, and a partnership with Microsoft to use Windows Phone software failed to gain traction. The company was forced to sell its mobile phone division to Microsoft in 2014 — a humiliating end for a company that once led the cellphone industry.

We don’t know if something like this is in the cards for Ford and GM, but it would be one way to explain why Tesla is so highly valued in comparison. Executives in Detroit think they can easily pivot to making electric, software-driven cars, just as Nokia thought it could adapt to a smartphone world.

Apple sells 20 percent of smartphones and earns most of the profits

One other important lesson from the smartphone world is that profits in a high-tech industry are sometimes much more skewed than market share. Apple sells fewer than 20 percent of the world’s smartphones. But the fact that the company makes both the hardware and software for the iPhone helps it stand apart in the marketplace, allowing it to charge a much bigger premium than its Android-based rivals. The result: Despite the iPhone’s modest market share, Apple’s quarterly profits often dwarf the profits of all other smartphone makers combined.

Like Apple, Tesla makes many components of its cars, from batteries to self-driving software, in house. Its roots in Silicon Valley mean that the software on its cars is likely to be better than software produced by companies like Ford or GM — a factor that will become even more important as self-driving technology becomes a significant factor in the industry.

Like Apple, Tesla has a significant base of ardent fans who follow its every move and are eager to buy its new products.

Tesla’s big bet on batteries could pay off handsomely

Tesla is also aiming to duplicate another of Apple’s key strategies: making big investments to lock in its supply of key components. One of Tesla’s big bets is on batteries. Electric cars need a lot of lithium ion batteries, and over the years Tesla has struggled to find suppliers to meet its needs. So a few years ago Tesla broke ground on the Gigafactory, a facility in Nevada that will supply the company with batteries on a massive scale.

Musk is betting that the Gigafactory will give him a big head start over rivals. He’s hoping economies of scale will make Tesla’s batteries cheaper than those from third parties. And as other car companies rush to build electric cars, they’ll discover there aren’t enough batteries to go around, making it hard for car companies to expand electric car production as quickly as Tesla can.

Obviously, it’s too early to say if this theory is right. Musk hasn’t even managed to produce an electric car that’s affordable to normal people — his $35,000 Model 3 is scheduled to begin production later this year. But Tesla’s stock price suggests that Wall Street is optimistic about Tesla’s chances.