It's a delicate ecosystem: the car salesmen need their cut to spend on drinking and gambling or else the bars and dog tracks will shut down causing more unemployment.
you can order a Ford Mustang Mach E from their website and have it shipped to a dealer and never really do anything at the dealers except get your new car
Because dealers have lobbied to have the law mandate them.
I know "deregulation" is a bit of a dirty word, but some regulations are genuinely bad. In this case, it's literal textbook rent seeking, in the economics sense.