If you can make goods cheaply and sell them for a good profit, you become wealthy.
This is something people had understood for thousands of years. One way to do this was to use machines, because they could produce goods faster than people.
But the machines needed looking after. Men and women were paid low wages to do this, but the factories needed even more help and lower wages. So they used children.