I'm certainly not defending the FLSA's farm exemption, which was clearly just a bow to a powerful special interest group [1].
Of course children don't want to work on farms or in factories. Does anyone want to work in a factory?
My point is simply that if you go to some random third-world country where children are working in factories, and you do nothing else than prevent them from working in factories, you very likely have not increased their quality of life. To your horror, you will see an increase in children scrounging for food in dumpsters. You will see them selling wares on the street. And you will see fewer families escaping a brutal life of farm labor to seek a better life in cities.
Your point about free markets also misses the mark. You could repeal all the child labor laws today in the US, and you would not find (a statistically significant number of) factories hiring children for the simple reason that with modern industrial techniques children wouldn't even be productive enough to justify their space on a factory floor. This is part of the reason why teenage unemployment is so high even though teens will work for minimum wage.
[1] Not to say that I think much harm comes from this today.