Thanks for that article. It says that all states have dumb laws that protect car dealerships in some way (but not always complete prohibition of direct-to-consumer sales).
Looking into this some more, it appears that the situation is complicated. About half the states allow direct-to-consumer sales of electric cars. (It’s the existing dealers of gasoline-powered cars that lobby politicians for protection, of course.) Source: https://www.mackinac.org/archives/2021/The%20Case%20for%20Direct%20Sales%20—%20March%202021%20Update.pdf
The whole thing is ridiculous. Of course you should be able to buy a car directly from a manufacturer, and the manufacturer should be able to sell a car to you.
I agree with you, but there are many ways in which government may protect politically active participants in the marketplace. Some of these are professional licensing, limited liquor licenses, etc. A free market works best for the public, but I don’t expect any one politician to work miracles.