This is just time out. Any parent of a high-maintenance 5-year-old will know that some kids act out, assault their peers, have tantrums and scream and yell. Other kids don’t deserve to be subjected to that.
Edit: To be clear, I’m responding to the quote here. I’m not condoning locking small children in bare rooms alone for hours on end.