ubercake :
When parents are jailed for drug offenses, they are separated from their children. When parents are jailed for stealing cars, they are separated from their children. When parents are jailed for murdering people, they are separated from their children. When parents are jailed for tax evasion, they are separated from their children... The list of crimes goes on and on...
When I go to another country and break any of their laws, I would expect to be punished accordingly.
I am not saying that none of the blame falls on the parent but most of these people have actually already crossed a number of international borders without issue and this wouldn't have happened while crossing any other border of a major country. There are lots of crimes that you don't get your children taken away for and illegally crossing into the US was actually one of them until recently. I can see how these people could reasonably expect that if caught that they would be kept with their children. Besides Trump has overturned this now and allows the parents to be detained with the children and for all his faults he is not one to cave to pressure.
It really looks like they didn't expect this to happen at this scale, used it to political advantage when it did, then overturned it when the point was made.