I think the best explanation from this is probably a thing Scott Alexander mentions in I Can Tolerate Anything Except the Outgroup:
And of course when you see people around the world allying with Europeans because they hate or fear their neighbors. Chief Massasoit of the Wampanoag through that the Pilgrims would be a useful buffer state between them and the Narraganset who had been causing them trouble and that's why he was willing to assist the Pilgrims. For 50 years that worked out fairly well. For the inhabitants of Mexico it went bad much more quickly.
Often in science fiction you'll see the world uniting in the face of alien invasion. Reading about these episodes in history makes me very skeptical about that. I don't think the US would invite aliens in right now just because the US is in such a secure position but I could easily imagine the US in during the Cold War trading large stretches in the South West for protection in the case of Soviet missile attack.