They do that because the kid in the hall stares in at the other kids, makes faces, and distracts them. If a kid is being really disruptive, a little time out in the hall is sometimes necessary.
Many parents have no idea what what sort of things their kid is really doing at school.
My son is there to learn not to make this fat stupid teacher feel good. If he is out in the hall, he is learning that abusive people are cruel and nothing else.