I think most of the weirdness comes from the fact that entering the country illegally, or remaining in the country illegally can be crimes, but they can also be civil offenses. “Civil” means no jail time, but people still get deported without going to criminal court.
“Civil” also means “doesn’t have to be proven beyond a reasonable doubt,” and “no constitutional right to a public defender.” Immigration law tries to provide limited forms of some of those ideas. There’s a kind of bail system, and people have a right to be represented by attorneys, but no right for those attorneys to be paid by the government. There is somebody referred to as an immigration judge, and they have a federal job, but they aren’t regular federal judges.
It’s possible to appeal an immigration court’s decision to a federal district court to get into the legal system we’re more familiar with.
* https://www.congress.gov/crs-product/IF11536
* https://www.congress.gov/crs-product/IF12158