Proper border checks don't do much if people enter the country legally but overstay their visas
IDs (along with verification laws) discourage employers from hiring unauthorized immigrants, and without access to gainful employment, many will opt to return to their country of origin, or choose not to come in the first place.