Anyone besides suspected terrorists on the no-fly list can fly into the United States. You don't know if the visitor is truly a visitor or if they are intending to overstay a visa and live in the US illegally. The President cannot read the minds of every foreign national.
Essex County was the government that discovered he was not just a visitor, but an illegal resident of this country. They did not approach the INS to identify him and initiate deportation proceedings.
Immigration officials apparently were aware of Carranza's illegal status since his prior arrests, according to Essex County Sheriff Armando Fontoura