The administration could have used 8 USC 1227, but they chose to use 50 USC 21.
. . .
Going back to an earlier point, the administration had plenty of other options to deport these people. If I had to concoct a (somewhat) viable reason to invoke the Alien Enemies Act (AEA), conceivably the administration might have had some evidence suggestng that the people that were deported were being directed by the government of Venezuela to harm the U.S. If the information was gathered through means the government does not want to disclose in court, conceivably the government could decide to invoke the AEA. Off hand, this strikes me as impluasible for several reasons, but I guess it is theoretically possible (I'm not taking a stand on this, if someone has a good reason this is not even theoretically possible I'm all ears, so to speak).
Here's a snip from the judge's opinion posted today:
>>>To preserve the status quo until Plaintiffs’ claims could be properly adjudicated, the Court issued two Temporary Restraining Orders that together prohibited the Government from relying solely on the Proclamation to remove the named Plaintiffs or any other Venezuelan noncitizens in its custody. Neither Order required the Government to release a single individual from its custody. Neither Order prevented the Government from apprehending anyone pursuant to the just-published Proclamation.
And neither Order prevented the Government from deporting anyone — including Plaintiffs — through authorities other than the Proclamation, such as the INA. Indeed, as the President last month designated Tren de Aragua a Foreign Terrorist Organization, members of the gang are already inadmissible to (and thus deportable from) the United States under the INA. See 8 U.S.C. § 1182(a)(3)(B). . . .
It is important to stress once again that the Order was narrow: it prevented Defendants only from removing the Plaintiff class on the sole basis of the Proclamation. In other words, the Order did not prevent Defendants from removing anyone — to include members of the class — through other immigration authorities such as the INA. Indeed, as previously mentioned, those affiliated with Tren de Aragua were all already deportable under that statute as members of an FTO. See 8 U.S.C. 1182(a)(3)(B). The Order also did not require Defendants to release a single person held in their custody, even individuals held only on the basis of the Proclamation. And it did not even prevent Defendants from apprehending noncitizens under the authority of the Proclamation (or any other law, for that matter).<< (emphasis added)
Here's the applicable provision from 8 USC 1227 cited by the judge:
>>>(B) Terrorist activities
Any
alien who is described in subparagraph (B) or (F) of
section 1182(a)(3) of this title is deportable.<<<
www.law.cornell.edu
The judge partly waived off on the political question doctrine
>>>Although it contends otherwise, the Government more fundamentally asserts that the Court has no business intruding into these nonjusticiable political questions. See Mot. to Vacate at 11–13. Given the broad powers the Executive possesses in national security and foreign affairs, this issue is a close call, and one the Court need not resolve today. . . .
The thorny issues of justiciability just described do not attend the entirely separate determination that an individual detained or removed under the Proclamation is, in fact, an “alien enemy,” 50 U.S.C. § 21, as defined by the President’s Proclamation — i.e., a Venezuelan citizen 14 years of age or older who is a member of Tren de Aragua and not a naturalized or lawful permanent resident of the United States. See 90 Fed. Reg. at 13034, § 1. As the Government essentially concedes, see Mot. to Vacate at 8; Mar. 21 Hearing Tr. at 13–15,
an unbroken line of precedent establishes that federal courts may review under habeas the factual basis for an “alien enemy” determination when it is challenged.<<< (emphasis added)
The opinion is 37 pages, but it's an interesting read if one wants to get up to speed on the legal issues involved.