I teach and I have kept children in before, not every day but it has happened. They are 7 and 8.
I always differentiate the workload between different groups, based on ability, and then I further differentiate my own expectations of what each child is expected to achieve in the group. They may be in the same group and have the same task but I don't expect wee Timmy to do the same as Tommy.
I only keep a child in when they really have not worked during the lesson. For example sitting for over an hour and not even completing 1/4 of the assigned task because they prefer to talk.
I'd never keep a child in who had been struggling to complete a task or if the task/concept was brand new to the group/child. However, if I know they can do it and have chosen not to then that is a different matter.
My rule has always been that it will only happen at break time, as lunch time is one hour later, or at golden time. They can eat their snack while working and as soon as they are finished they are free to go outside/join in golden time for the duration. Never have I returned to class to see a child still working away, they've generally completed the task to the expected standard in 5 or 10 minutes, letting me know they were just messing around in class time.
I could never send jotters/books home for the work to be completed as I need to use them the next day and I look over every single piece of work each night to monitor progress and check for any difficulties (so normally about 75 different marked tasks - 25 literacy, 25 maths and 25 topic/science/rme etc).
I don't like keeping them in and have only done it a handful of times although those who have been kept in are generally spurred on more towards break time as they know the consequences.