Jail time doesn't determine whether or not an act is legal (consider running a red light or underage drinking). In particular, the law you cited above is pretty clear that entering the US to seek asylum is illegal but may be forgiven if asylum is granted. To be clear, these detainees are held under the pretense that they are going to be deported (however they must first be processed). The valid criticism of ICE is that they are apparently detaining US citizens and the detention conditions are unsatisfactory, but it's not a question that it's illegal to enter the US to seek asylum.