In times of national emergency, the United States military has been far less restrictive in its recruitment policies than it is today.
In fact, during World War II, some noncitizen men who couldn’t provide proof of legal entry to the United States were permitted to enlist.