they are just using Mexico as a way to get around tariffs and other trade restrictions. On paper it might say "Mexico" is the biggest trade partner for the US, but the reality all the stuff is still coming from China with an extra hop to do final assembly in Mexico. China is doing the same thing with manufacturing in Vietnam, all the money still flows back to China in the end
Mexico has none of the actual infrastructure or skilled workforce needed to be an actual manufacturing powerhouse that makes things from scratch