A dealer marks up the price to make a profit. They take a calculated gamble that on average they will make enough overall profit to cover the cars that cost them money to fix.
A consumer is prepared to pay extra to buy from a dealer because they aren't just buying a car. They are buying a degree of protection by paying extra. It's not just a car they are buying.
In most cases the dealer wins by profiting. Sometimes the dealer loses because they didn't inspect the car properly before deciding to buy it and flip it. But at the end of the day my opinion or yours isn't too important because it has already been decided by wider society that consumers should get protection when paying a premium to buy from a dealer looking to make a profit. Anyway, neither of us will convince the other
I purposely bought a car from a local dealer for this reason.
Back in may last year I was looking at 2 cars, a vauxhall astra vxr (2016) and a Kia ceed GT (2015), the Kia was being sold at a main dealer 5 minutes from home and the vauxhall was a private seller and old boy who treated himself for retirement then realised the car was too fast for him.
After some pondering and knowing that either car could be costly to repair as second hand and being they are fully loaded with all sorts of wizardry I decided to do the sensible thing and buy the Kia from the main dealer for the piece of mind.
I'm a car guy and normally do my own servicing and big jobs until recently with kids and a busier day job etc sometimes it's easier for me to pay someone to service. My day job is actually rebuilding engines though I'm more office based these days, but basically I know my way round an engine.
Essentially the Kia has had little niggles since I got it, and dealing with the main dealer has been an absolute pain in the backside and tbh I wish I'd gone for the vxr. I would have known their was no warranty with any niggles and I would have just accepted as such and fixed whatever was needed no quibbles.
With the dealer when fighting to get things sorted I could have just paid for it to be fixed but then it's the principle. I specifically paid over the odds because I was dealing with a main dealer and they are supposed to have gone over the car with a fine tooth comb, but as it happens most of the faults were there at the last mot and failed because of it, yet seems a hooky mot was put on it, and then the car traded in a few months later.
In future I wouldn't be too bothered about buying from a main dealer, I haven't felt the benefits of it.
Also found out that dealers are no more honest than your back street mechanic, it's just mutton dressed as lamb.