Given there was a time when cars were (proportionately) more expensive, much less reliable, and mergers of companies were more common, requiring a dealer network to avoid you getting a very expensive dud probably seemed an attractive idea to the public.
More precisely though, those potential cost savings are primarily attributed to shifting from a build-to-stock to a build-to-order model, which at least in principle could be done with existing franchised dealerships. That paper also found that dealerships didn't consistently make money on new car sales. They make a lot more from service and parts.