I'm not in love with dealerships, but one thing that a dealership does is provide final QA on inbound cars. They don't catch everything, but they do catch some of the things that slipped through QA at time of manufacture.
It's somewhat telling that Tesla has a bad reputation for delivered quality, and they don't have a dealership network that does final QA.
Of course, dealerships also like to install unnecessary options while they're doing the other parts of dealer prep, so it's a mixed bag.
Indeed, a good dealer will spend several hours checking out the new arrivals and then detailing them to remove the transport dirt. AFAICT Tesla doesn't do this as well themselves, both my Model 3s had some fairly obvious defects that took me under a minute to spot.
It's somewhat telling that Tesla has a bad reputation for delivered quality, and they don't have a dealership network that does final QA.
Of course, dealerships also like to install unnecessary options while they're doing the other parts of dealer prep, so it's a mixed bag.