Uhh no that's not at all correct. The taxes are paid to whatever jurisdiction you register your car. If you live in Texas and you buy a car in Wyoming the Taxes get paid to you local tax accessor. It doesn't matter if you buy it from a dealership or a manufacturer.
Manufacturers also have employees in the regions they sell because they need staff for their delivery and service centers at minimum.
The history of how we got here with dealership laws is long and complicated but basically boils down to starting with something useful like a verifiable local agent in a time when many small car manufacturers were selling essentially carts with primitive engines through mail order catalogs. Then slowly gaining political and economic power and protecting that power through local and state laws limiting competition and legally enforced monopolies. In short, corruption.
You'll notice many influential and wealthy lawmakers in state governments own dealerships. Unsurprisingly they're near uniformly anti-taxes and 'big government' so the "but dealership pay taxes" argument rarely holds sway as they're constantly fighting against it.
https://pressbooks.ulib.csuohio.edu/evolution-of-local-deale...