However, that ignores the long term costs, which may be what you are alluding to. Farms don't operate at huge profit margins, so they cannot compete with each other if they started hiring significantly more labor. One primary feature of governance is passing on long-term expected costs (e.g. ecological collapse and unemployment) to citizens/businesses optimizing for short-term profitability.
In this case, you would want the government to somehow identify each farm's contribution to the ecological cost, and figure out how to pass that cost along. One possibility would be a pollution style tax.
If herbicides all of a sudden cost significantly more due to taxes, then other solutions (like labor) will become more common.
Our society also benefits from an increase in the number of jobs, which may have also been what you meant by "optimum". Creating meaningless jobs (e.g. picking/weeding when you could use a machine for less) does not add any long term economic value itself, though it does increase stability. It would be more efficient to just tax the economic base, though, and use the money for something economically more productive than weeding.
What happens to the people displaced, I dunno. Malthusians and Luddites have been telling us we're all going to die in a mass of unemployment and poverty for a quarter of a millenium, and they've been consistently wrong, mostly because they lack the imagination (as we all do) to see how humans will cleverly adapt to the new reality.
In the medium term, agricultural robots may displace a lot of pesticide use as well, because if you have a solar-powered 24/7 robot weeding, you don't need chemicals. This also should be viewed as a good thing.
But a world where robots can do everything, including writing this post for me, creates an interesting problem. Most people--especially men--are not well-suited to not having work. How we fulfill people's need to work in a world where there is no work that needs to be done is an interesting problem to have. But remember that there was a Roman emperor who killed off an early attempt at industrialization and rudimentary assembly lines because he feared what the newly-unemployed would do, and worried that surplus slaves would revolt. It's hard to argue, knowing what we know now, that he made the right decision. Our inability to see our own future shouldn't stop us from embracing it.
I imagine it will allow people to work on what they want to work on, instead of what they have to work on. I, for one, would stop spending ~40 hours a week building software for others and build myself an airplane instead. Next? Maybe a sailboat. Sure, the robots could do it better and more efficiently, but I enjoy doing that sort of "work".
But what do I know, maybe not everyone is like me. Maybe it'll turn into Wall-E, or everyone just ends up sitting around watching Friends reruns, or most people would form street gangs and battle it out out of boredom.
When we can find ways to produce a given quantity of food with less land, water, fertilizer and fossil fuel, this, as far as it goes, is an un-alloyed good.
But less labor is not as clearly so. Of course for a time it was necessary: we needed to move on from the situation where agriculture required ninety percent of the workforce. But nowadays we are finding the economy provides too few jobs, and in particular too few jobs that don't require specialized skills or markers of political status. Maybe there is some optimum of labor efficiency in agriculture, and we've overshot that optimum?