The court's majority said Trump's foreign policy authority outweighed the harms claimed by the international aid groups suing.