You seem to have monumentally confused the issue of military cooperation with a country and limiting travel or immigration from that country. Counties have made alliances of convenience from time immemorial often while effectively banning or at least severely limiting immigration and travel.
I don’t need to let you stay overnight in my house for us to agree on a business deal.
We should deal with countries and peoples on the basis of enlightened self interest while attempting when possible to prevent genocide and to also promote Western values.
Letting in lots of people we truly cannot vet and who do not subscribe to our values is dangerous and ill-advised. We need to be even more vigilant now not to let in thousands of ex-ISIS jihadis escaping from the collapsing caliphate in Syria.