I keep seeing World War II over and over again.
Did you know Americans did the exact same thing with the Jewish refugees that we're seeing with the Syrian ones? Yep. Until they found out about the concentration camps, they didn't want the refugees here. And apparently it wasn't just run-of-the-mill prejudice, but fear that they were going to come in and take over and spread Jewish Communism all over the world. I've seen the exact same rhetoric regarding the Syrian refugee (except, of course, it's not Jewish Communism, but Islam the people are afraid of taking over).
The governor of North Carolina, I think, actually casually suggested internment camps like what we did to the Japanese Americans after Pearl Harbor, as though it had been a good thing.
Then, there's the sudden interest in our own homeless and starving. Don't even get me started with that.
The change in mindset when people are called to actually step up is mind-boggling. I kind of want to see a Psychology or Sociology person do a paper on this phenomenon.
As for the terrorists, as someone else mentioned, the Middle East has been a sort of political dumping ground since pretty much the beginning of humanity. (If you assume the Bible has any historical accuracy in this case) the Israelites were enslaved by the Egyptians, leaving that land to be taken over by the Canaanites, which they then had to take back and keep. Then the Romans came in and tried to expand into the Persian Empire, causing a few hundred year-long "game" of tug-of-war with the towns. Then the Jews revolted against the Romans. Then the Muslims came in and started conquering everything. Then the Turkish invasion and the rise of the Ottoman Empire. Then, the French and British come in and start occupying everything. Then, you get a bunch more conflicts, then the (re)creation of Israel, which leads to even more conflict. Is it really any wonder that place is in shambles? I think it's only seen peace for about 10% of the time people have actually been there...
That wears on people after a while. And you end up with dictatorships and totalitarian regimes taking over, because the place is too unstable to support a functioning democracy or republic, and propaganda is spread that the latest aggressors -- most of the Western world -- hate them, a fact that, from their point of view, goes pretty well undisputed as we carpet-bomb their cities and continue to occupy their country (regardless of our intents, the propaganda convinces them that we're doing more harm than good), or fund the people that continue to mortar their towns.
Thankfully, most of the people realize that the Western countries are trying to help and so they don't hold contempt against us as they try to get away from that. But it does breed discontent among some, and the perceived injustices being done make many ripe for grooming for terrorism.
The thing that makes this war (and at the rate it's going, it will be a war) different, is that it's as much a war of ideologies as it is a physical one. For most of our past wars, the ideology was little more than propaganda to spur people into action for "their" side. This time, though, the very fact that we've become afraid to take in the refugees plays right into the terrorists' rhetoric. In order to win this war, we have to face these fears head on. What we do with the refugees may very well determine the course of events in the coming months/years.
It reminds me of the White Walkers in Game of Thrones, or the second season of Legend Of The Seeker, or any such battle where there's an undead/army of the dead element -- the more we kill the living, the more we bolster that undead army with soldiers. So many people are refusing the refugees, because they're afraid that some of them might be terrorists, but by turning our backs on them, we create more enemies as we prove the terrorists right.