I don't follow.
You're saying the purpose of NAFTA was to reduce illegal immigration? I think that's a potential side-effect, but I don't see how that was the purpose, in any serious way.
Such trade agreements are designed to be win/win, and economists largely agree net benefits all around.
The biggest immediate downsides are loss of U.S. jobs and having to shift to new industries.
For the small slice of people that are caught in that job loss and are maybe too old to retrain, we should help provide support, since it's us, the nation, that benefited from shipping their jobs overseas.
But traditionally Republicans fight any such legislation designed to help victims of aggressive economic policy that enriches many in the U.S., but leaves some out in the cold.
https://en.wikipedia.org/wiki/North_American_Free_Trade_Agreement
What I did read was that some (most?) believe Trump's notions regarding NAFTA are misguided: