I remember it as countries where they couldn't "vet" the people coming in. So similar. But when I read the source material it doesn't say that specifically.
The way I reason:
1) If a nation state sponsors terrorism against you or your allies, then you cannot trust them
2) This lack of trust extends to their documentation about their people. They have an incentive to send you criminals and militants.
3) Therefore you need to find another way to vet these people without needing to trust their untrustworthy nation states.
https://www.federalregister.gov/documents/2017/02/01/2017-02281/protecting-the-nation-from-foreign-terrorist-entry-into-the-united-states
https://www.dhs.gov/archive/publication/executive-order-13780-protecting-nation-foreign-terrorist-entry-united-states-initial
https://www.supremecourt.gov/opinions/preliminaryprint/582US2PP_Web.pdf
https://www.supremecourt.gov/opinions/preliminaryprint/585US2PP_final.pdf