Of course they would not be allowed to leave like that. From immigration's point of view, especially in regard to children ( have you heard of human and child trafficking? ) who are they, how did they get into the country, why have they no entry stamp and no Thai visa. You are assuming things that Thai immigration would have no knowledge of. Immigration acting entirely correctly, the parents should have planned and researched more carefully and asked for advice, instead of assuming and getting it wrong.