You are referring to this hadith from sahih al-Bukahri.
Is Agriculture frowned upon?
Note that this hadith doesn't prohibit agriculture as it may seem.
Why: Because of sahih hadiths like this from sahih al-Bukhari
"There is none amongst the Muslims who plants a tree or sows seeds, and then a bird, or a person or an animal eats from it, but is regarded as a charitable gift for him."
And statements from the Quran like (56:63-64)
How to understand this hadith?
You must understand the hadith from two possible angles:
- The fact that the sahaba (May Allah be pleased with them) were asked to perform jihad instead of cultivating their land. And people who are cultivating their land won't go and fight or won't have time to train themselves, so the non-Believers could easily beat them in a battlefield. This meaning can be concluded from this hadith from sunan abi Dawod.
- The fact that farmers later have been kind of slaves for the owners of the land as we have seen in medieval Europe and elsewhere through history. This is the View of ibn Hajar al-'Asqalani in fath al-Bari.
So it is in first place an invitation to strengthen the rows of the Muslim army and also a kind of prophecy that farmers would be humiliated by landlords etc.
Here my references so far:
And Allah knows best!