TESLA, THE start-up founded by Elon Musk to build luxury electric cars, has benefited mightily from government support. A half-billion-dollar federal loan, recently repaid, helped the company weather the Great Recession. Tesla logged its first quarterly profit this year, thanks to emission credits it earned under a California regulatory scheme. But in one crucial respect, government has been working against Mr. Musk and his fledgling enterprise — and rather unfairly at that.

We refer to the state laws that protect existing car dealerships and their various prerogatives, including laws in most states that make it illegal to sell new automobiles without a license, as well as many other statutes that make it nearly impossible for a manufacturer to fire a dealer. Tesla’s business plan, however, hinges on direct sales to consumers through company-owned stores.

Tesla managed to open stores in Minnesota and Massachusetts by exploiting loopholes in those states’ laws, but it has been rebuffed in the giant market of Texas, where the legislature refused to adopt a bill that would have let Mr. Musk’s firm deal directly with car buyers. Virginia denied Tesla a license. The company can still sell cars over the Internet, as long as the actual sale occurs in California, its home state, and buyers register their vehicles locally when delivered. But legislation being considered in North Carolina would make it impossible for Tesla to do even that in the Tar Heel State.

Dealer protectionism is not bad only for Tesla and the admittedly small group of people wealthy enough to consider its cars, which start at $62,400. It’s also bad for consumers generally, for the reasons you’d expect: Manufacturers, buyers and sellers of vehicles should be free to come together in the ways that they find, over time, to be most cost-effective. It’s not for politicians to determine the optimal mode of distributing merchandise, even when the merchandise in question is something as large and as important to society as an automobile.

Auto dealers, of course, see it differently, arguing that their businesses have an incentive to invest more in customer service than manufacturers would, that they help states collect revenue via taxes and title fees and that they are often family-run pillars of the community.

The dealers aren’t so much afraid of Tesla, which is not likely to be a high-volume seller soon, if ever. Rather, what worries them is that allowing Tesla to sell directly to consumers would set a precedent for the established automakers, who have been trying to get rid of the middleman for years. Dealers warn that would mean the rise of big-box car retailers and the death of small-town enterprise.

We have no particular brief for Tesla; its stand is not entirely principled, as shown by the fact that the direct-to-consumer law it supported in Texas would have applied only to Tesla. This federally assisted start-up is an unlikely free-market martyr.

The fact remains that innovation is the lifeblood of capitalism — and that for years the auto dealers have been using their political clout to resist it. Dealers insist that the current franchise laws enshrine an optimal arrangement for consumers. If that’s true, then they have nothing to fear from Tesla or anyone else who wants to offer something new.