I dont think that dealerships are going extinct anytime soon. They have a lot of clout and political power.
Tesla moved their factory & headquarters to Texas but still cannot sell Teslas in TX without a dealer due to their franchised dealership laws.
Carmax is a good service but it does not sell new cars, only used cars.