This is nothing new and a known consequence of globalization. Especially when their is no/low tariff and cheap transportation, as is the case within the EU.
This mean that, either you let some industry die off and rely entirely on importation (which we did for a lot of manufacturing where everything is know produce in mostly Asian country) or you heavily subsidized it to keep it alive.
In the case of agriculture, France heavily subsidized it to keep it alive as it is considered a strategical industry. It is a huge sink hole for France, and as far as I know for the EU. I don't know if they really profit from it financially speaking, but they do need it for soft power and to not being subject of more influence from other country.
Overall, their is probably some hypocrisy about globalization within farmer. But isn't it also a natural human behavior ? We tend to scream about injustice unless this injustice profit us.
I am no economist but I think that the low cost of transport is one of the factors that could be somehow influenced. We keep trucking stuff thousands of kilometers whereas it could grow and be processed just next-door.