Of course they deserved incarceration. Try breaking illegally into Thailand and see where you end up. The IDC, that's where.
If they have children there are 2 choices, separate the children or send them to the IDC as well. Neither are good options, but the fault is with the parents wilfully breaking the law, not the country enforcing it's laws against these criminals.