Earlier quoted context omitted.
And how many of those countries have an illegal immigration problem? I bet that most of them would quickly remove that loophole if people actually started to exploit it.
Root cause it. The USA does not have an illegal immigration problem. It has a "huge, slow immigration bureaucracy" problem that makes the legal path so slow and difficult that people are incentivized to gamble on illegal paths.
But a big part of the problem is that many people do not have a legal pathway available to them, and either don't believe that or don't wish to accept it. So they spend years carefully pursuing every bit of due process they're entitled to, and those stories become part of the "slow immigration bureaucracy", regardless of whether the result was ever really in question. This is where immigration reform proposals have generally gotten bogged down; some people strongly feel we should resolve this by creating a general legal pathway, others feel we should resolve it by expediting removals, and both groups are very hesitant to agree to a proposal that doesn't resolve it at all.