There are three main factors that make Mexico attractive to American businesses as a place to produce goods.
First, there is the fact that Mexico shares a land border with the United States. One problem with having goods made in faraway places like China is that they take a very long time to get to the United States. If a firm produces its goods in Mexico, they get to the US very quickly. This makes the firm more agile because it can make changes and have those changes show up in the products that are entering the country mere days later.
Second, there is the fact that labor in Mexico remains cheaper than that in the US. By sending production to Mexico, American firms get lower costs. This makes them more competitive in today’s globalized economy.
Finally, there is the fact of the North American Free Trade Agreement (NAFTA). NAFTA has removed most trade barriers between the three countries of North America. What this means is that goods from Mexico will not face tariffs or other trade barriers that make them more expensive.
For these reasons, Mexico is a relatively attractive production site for American companies.