The connection may seem distant, but the two are intimately related. Counter insurgency models since Sun Tzu's "Art of War"have all emphasized that the way to combat an insurgency, such as ISIS, involves removing their bases of support and pushing them out of urban centers.
It would make sense that doing the opposite tends to have the opposite effect, yet this obvious connection is easy to miss. Take our political leaders in 2003, during the invasion and subsequent occupation of Iraq. Coalition forces rolled up the entire Iraqi army within a few months, leaving nothing but a weak and tangentially relevant insurgency. Despite adamant warnings from military leaders on the ground in Iraq, American diplomat Paul Bremer had the brilliant idea of disbanding the Ba'ath party and turning nearly 90,000 military aged men into an economy he had just single-handedly wrecked.
One might not be surprised to find that American casualties skyrocketed and IED's grew in strength and complexity, as former Iraqi military members turned to Al Qaeda for employment, revenge, and often coercion by threats against family; a tactic ISIS very happily uses today. Things did not get better in Iraq until General Petraeus moved troops from highly secure yet isolated forward operating bases (FOBs) and into Iraqi communities to work out relatively mutually beneficial relationships with civilians. Afterwords, casualties dropped to a mere 5 percent of what they used to be and Iraqis moved definitively towards owning their own future democratically (which they embraced with a higher voter turnout rate than even the US, despite very real threats of violence).
If we can admit that ISIS is fundamentally our problem, and it is (if you'll recall, we built them), then we see that the refugees are similar to our afflicted populations in 2003 Iraq. By denying them a place to go we are feeding ISIS recruits, both willingly and unwillingly. This is bad counterinsurgency, and is militarily unfeasible. If we really want to take the lead in the global war on terror, we ought to take in the most amount of refugees and be unflinching in the face of our fears. While its easy to think that middle eastern hatred for Americans isn't our problem, it fundamentally is.
If we want to kill the ideology that allows for such atrocities and militant actions against us, we should fight it in the most effective manner; delegitimize the philosophy behind it. If we want to stop US citizens from joining ISIS (which happens far more often than ISIS recruits among refugees) then we should teach the world to respect American compassion. By doing this we rob ISIS of recruits, and if we continue our job of pulverizing them where they live then they are doomed to failure. By accepting these refugees then, we are practicing excellent counterinsurgency and recruiting allies in the fight against radical terrorism.