Without parts and assemblies from Mexican factories, the automakers could not assemble motor vehicles in the USA.
It is my understanding that Mexico exports more industrially-made products to the USA than China does.
Those aren't "Mexican" factories and those aren't "Mexican" exports in that they're made by companies set up under the corporate umbrella of parent companies that are nominally from the United States.