Ultimately, it comes down to "this is something that could be done better by a trained adult, but we don't have the same access to trained adults that we do to children, in part because of the massive economic inequalities our society experiences today."
I need someone for to do a seasonal jobs for a few weeks and then nothing until next year is fine if it’s a niche job like say selling Christmas trees. However, when every farm for thousands of miles all needs that same labor for those same short window you get a massive labor shortage. Worse modern farming is mechanized so you can simply put people picked off the streets behind the wheels of 100’s of thousands of dollar pieces of equipment.
There’s a similar exception in US immigration for migrant foreign workers to pick fruits and vegetables, but again the minimum threshold for competence in other types of farm labor is higher.
What has changed is not just the levels of automation involved, but also the percentage of people working as farmers. A Doctor, Lawyer, Programmer, etc simply can’t leverage their kids nearly as effectively.