They weren’t just deported - as many commenters seem confused about. They were sent to a maximum security prison without court hearings so their prison sentence is open-ended, similar to the 9/11 era detainees at Guantanamo Bay.
Some might have been gang members as the Trump admin claims, but others had no criminal record.