Often, the alternatives are not as idealistic as these well-meaning efforts would suggest: children are faced with even more extensive poverty instead of schooling. A ban only shoves the work into illegality, so states should focus on enforcing better working conditions first.
It takes the choice from away from the child. If child labor is allowed you have two choices, work or not, if child labor isn't allowed you can't work. What if you would starve otherwise? What if you have to prostitute yourself otherwise? What if you have to stay with abusive parents otherwise?
This is true of many situations, qualifying an argument with "In some cases" is not a good way to structure an argument as we can always come up with a hypothetical edge case for a statement to hold true.
e.g "In some cases it is good to firebomb cities" can be qualified by WW2 but not normally.