I don't know about what's in America's favor. I know for a fact that I would not willingly compete with all software developers in a global marketplace. I'd lose my big4 job in a split second. Canada's tech sector may stand to gain, but I'd lose half my real income if I were to relocate to a sister office across the border. So much for progressive visa policy.
By way of a thought experiment: If all human beings are equal, is this a necessary and sufficient condition to let a homeless person stay with you for a night? Assuming this is an option for a relative or friend. Why not willingly give up your job now? Surely someone can lay claim to your job on some merit basis. If you have children, do you distribute your time and affection in proportion to merit?
I don't see why I should give up my hard won comfort -- won collectively by my ancestors, neighbors, compatriots, myself -- to strangers. It's natural to accord special status to yourself, then to some close kin, ..., then to fellow citizens, then to the rest of humanity.
I understand your point is that direct confrontation at times cannot be avoided. In particular, you may be provoked to defend yourself, as in the Soviet Union entering WWII upon Germany violating the Molotov-Ribbentrop pact. I'm of the opinion that only this latter case of agression justifies taking up arms. Any violence by way of preventive action lends itself too easily to abuses, as we see with the so-called war on terrorism. In the context of WWII, it's not at all clear that anything other than collective action of the allies and the Soviet Union could have stopped Germany. And for that, the events had to run their course. One can find fault with indecision on refugees, but not with appeasement efforts.
I agree that with asymmetrical warfare resorting to terrorism is rational. What seems irrational is our inability to recognize the struggle of our enemy for what it's worth and our refusal to negotiate. I can't think of an example where negotiations (as in granting that your partner in negotiations is your peer) haven't led to a net positive outcome. To take but one example close to home: The Soviet Union was founded by a terrorist group. The ultimate recognition of the state by western powers and their foreign policy of engagement -- aside from the Cold War era -- was instrumental in bringing the enemy to its knees (whatever the wider repercussions of this outcome).