Just consider the Polish protests against Ukrainian grain, or the recent German protests against cutting fuel subsidies for agriculture. It just costs too much political capital to do anything about this...
The same applies to so many other types of agriculture. Nobody wants to let farmers go out of business for decades now in the Western world. And the rate of "natural attrition" hasn't matched the rate of technological efficiency improvements.
There is of course agriculture that isn't as efficient because higher human labor required for things like picking and sorting. But the automation for that is slowly coming.
For certain agricultural goods perhaps, but the Midwest is the most productive region for agriculture on the planet. Russia and Ukraine have vast areas of land, they focus on wheat because they mainly have marginal land and a limited growing season and wheat is perfect for that. Most of Africa and much of South America (Argentina being a notable exception) have terrible soil and require significantly more fertilizer to grow crops at scale. Labor is cheaper in those regions but that’s only one factor and it’s why so much farm labor has been automated in the US.
but they are the single largest exporter of grain overall, mostly corn from the midwest and California produce. the Green Revolution hit hard, and most farms are now huge consolidated enterprises. by comparison, in a lot of the world, most farms are smaller and often single family, and in many cases still using old world techniques -- e.g. non-trivial numbers of people plowing their fields with oxen, etc.
European here, we could and should close our borders for agricultural goods that we can grow ourselves (and you Americans should ban alfalfa exports from California, while you're at it). Ag subsidies are only required because there's no way an US or European farmer can compete with Russian, Ukrainian, South American or African labor and land costs, but we still need farmers to ensure we're self-sufficient and don't end up like many developing nations did once Russia blockaded Ukrainian grain exports.