There are lots of other Non-Mexican criminals coming from Central & South American countries that are South of the USA. In other words, "FROM Mexico" is not the same as "THRU Mexico" as Mexico is the *Last Stop* before any entry to America by land route from Central & South American countries.
By putting a WALL, Mexico also helps itself since criminals from all those other Latin America countries would be more hesitant to travel Northward through Mexico, a transportation "Last Stop", to get into the USA. Hence, Mexico's Internal crime & corruptions could be significantly reduced with an American Border Wall. Basically, there would be TWO (2) WALLS (America's New Wall and Mexico's Existing Not-So-Great, Porous Southern Natural Barrier / Wall) to reduce criminals & drugs flowing from the rest of Central and South America.
If you think about it, reducing or restricting criminals & drugs to America benefits all of Central & South America as they too are terrorized by these same criminal networks & drug addictions; Hence, reducing their illegal money flows from America can cause these same criminals to hopefully change their evil ways even in their own countries.