One thing is that in most states the laws were written to protect franchises against the car manufacturers but in this case there are no franchises to protect to often these laws don't apply.
This podcast gives a lot of insight as to why the dealerships are so anti-consumer blood sucking parasites.
One other thing to keep in mind is that the dealership model has changed significantly. It used to be a bunch of mom and pop dealerships throughout the country. These aren't the dealerships complaining about Tesla. Instead it's the huge dealership conglomerates that have gobbled up and consolidated many of the smaller independent dealerships. These are also huge political donors in many states, getting laws written to protect them, often to the detriment of the automobile manufacturers.
Part of it is the way the car manufacturers have the dealerships competing against each other, giving them huge incentives to sell a certain number of cars by the end of the month, etc. The dealerships also make a lot of their money off of service, whether it be warranty service or just plain service.
Tesla does things differently. The people who work at the showrooms do not earn commissions on cars sold. Their job is to show the car, not play all these silly games pushing cars that people don't want to get their numbers.
Also, Tesla generally does not maintain an inventory of cars. Every car is built to order with only the features the buyer wants. They don't have huge lots of cars that they have to push since every car is already spoken for.
Their service is also different. They have publically stated that their goal is not to make a profit off of service. I have had to have things repaired that were not covered by warranty (I broke some clips). The cost to repair was actually fairly reasonable and was much less than what the cost would have been had the same sort of thing happened to my Prius.
My biggest complaint about service is that there is often a long wait to get an appointment because they're having trouble keeping up with the growing number of cars out there.
Tesla took a cue from Apple with the Apple stores. They want to provide a consistent experience for their customers without all of the hassles and problems often encountered at dealerships. The company has also consistently bent over backwards in favor of their customers. When news of the fires hit they quickly extended the battery warranty to cover fires caused by hitting objects then actively worked on methods to mitigate it. They retroactively increased the drive train warranty to unlimited miles.