The problem comes when dealerships use maintenance as a cash cow. Most dealerships make very little money selling cars. Most of their income comes from financing and service.
I bought my Tesla online without going through a dealership. I was able to specify exactly what I wanted in the car. Furthermore, their goal is to not make a profit off of service. I have no complaints about the service I've had, it's far better than what I've experienced with dealerships.
Granted, I can't negotiate down the price of the car. Then again, when I bought my Prius years ago and that car was in high demand it was impossible to negotiate down the price and in fact many dealerships were charging a premium. It took me 6 months of waiting to eventually get my Prius with the options I wanted. It was my 3rd choice for color. I could have gotten one much sooner as long as it was white or possibly black.
I also waited about 6 months for my Tesla, but unlike my Prius, I got exactly what I wanted.
I don't miss the Toyota dealership frequently trying to push unnecessary service or raping me over the coals for flaws in my original vehicle. For example, the HID headlights burned out just after 3 years and though I had a 7 year warranty they wanted to charge me $340 per headlight to change it, charging $200 per-bulb despite the fact that I could buy the same brand-new bulb on Ebay for $50. It was a known flaw in the bulbs. Some customers got screwed further when the dealership charged to replace the inverters as well (which were not the problem).
Then there's the center console going out. The dealership charges at least $2000 in labor to replace it. I just watched a Youtube video on how to replace it and it takes roughly 20 minutes to do it yourself.