Indeed that picture of the child miner is basically fake.
You might be shocked to learn that small children are not actually able of doing the kinds of rigorous labor needed for mining. People claim this print is a sprat doing mining work, but it's actually just a sprat dressed up as a miner shot in a photography plant.
The kiddies that did work in the mining industry in the late 1800s/ early 1900s were either significantly aged, or they were doing much less challenging jobs like bringing miners water and similar.
And the whole reason kiddies worked also is the same reason they've always worked throughout history - They were poor and destitute.
The thing that ended child labor - as the meme points out - was the rise in real wealth that came about as a result of (Western) countries espousing profitable systems that were erected on private property, individual ownership of resources, lower entry barriers to trade, and entrepreneurial freedom. Capitalism.
Every point in history previous to that moment was full of child labor, and indeed now, child labor remains a problem in countries that have most oppressively rejected free enterprise. Parents do not want their children to work. They also do not want their kiddies to starve to death. And where you have massive poverty, that's actually the trade-off. However, the family does not eat, if kiddies do not contribute to the family income. So kiddies have to work.
The result is to increase wealth through capital enhancement. When one or two people can be productive enough to support a whole family, also the rest of the family can go about having a nonage, having an education, etc.
Unions had nothing to do with it, and neither did labor laws, which were only passed long after child labor had principally ended in the US.