Throughout history the parents of most families could not produce enough to support their families without having their children work also. It was the accumulation of capital by the industrialists that increased the productivity of adults, so that children did not have to work in fields or factories. In poor non-capitalist countries they are still working in fields and factories, because the parents are not productive enough to support their children.
Historically, children working in factories (and fields) was only a transitory stage between early feudalism and capitalism. Prior to working in factories, before the Industrial Revolution, many children (and their parents) used to die and starve, as evidenced by the high infant mortality statistics before the dawn of the Industrial Revolution. Observe that is was not until families left the “country” and went into the “cities” that they were able to produce enough food to eat. The clearest evidence of this is population and infant mortality statistics: population did not go up and infant mortality did not go down until the Industrial Revolution.
If life was so great before capitalism in the “country”, why was infant mortality so high and population numbers considerably lower before capitalism? Answer: because life was not so great until the Industrial Revolution made its appearance.