The idea is to make sure there is market efficiency, e.g. competition, in price throughout, so the consumer doesn't get screwed.
Now the idea of a franchise law like this one is done in a similar vain: it appears to ensure better competition for big car makers to bring their goods to consumers.
The problem is this law is written from a perspective of a couple major car companies that dominate the market.
There has always been an argument that a small player cannot be considered to wield market power, and that thus they should be allowed to be vertical. Apple for a long time avoided any anti-trust issues (while Microsoft didn't) even though it was very much vertical, by being small! Tesla presumably will use the same argument.
Bottom line there are two sides to laws like these: on the one hand, in Tesla's case, they seem anti-competitive. On the other hand they are made to bring about a kind of competition. Clearly the courts will need to resolve this...
I also find it interesting that you also compared them to Microsoft, since Microsoft is now opening retail stores.
The key reason Apple isn't considered a monopoly is that even though they are huge, they don't' have a monopolistic position in their products. For smartphones they have a market share of ~20% worldwide and in the PC market the hold ~5%. Even on the country level, the numbers never get to a level where people would usually scream monopoly.
You could argue that they probably have monopolistic market share on the tablet market but most wouldn't consider that an industry in itself (yet) and they haven't exhibited the characteristics of a monopoly: price setting for the industry and an inability for new players to enter the market. It's actually possible to not be considered a monopoly even with a huge market share if you can prove you don't control the industry.
Apple's normal business model allows them to thrive without being a high volume business; their per device profit margin greatly exceed any competitor, so they can still be hugely profitable with low market share.
Concludes that state regulation is necessary to the extent it neutralizes the disparity in bargaining power between the automakers and the dealers, but that current legislation no longer achieves this and only benefits the auto dealers.
Tesla is not only upsetting the apple cart when it comes to sales but service; I do not agree with their service side changes because it takes choice out of the hands of the consumer. (disclaimer : I work for a parts distributor who happens to own repair shops too).
Dealers are rightly upset because the current system requires them to put up a lot of money in facilities that must be built to specific guidelines. Throw in having to meet manufacturer set requirements for sales and service they do have a large investment. Contrary to belief, the majority of new car dealerships are very good people who do go out of their way to help people.