Farmers provided for their family by cultivating the land and selling the crops. In the city, this mean of making money wasn't possible, so they would have to turn to other professions.
However, without any other knowledge or ability it was hard for farmers to provide for themselves and their family. Without money, it was impossible to move around, so they got trapped in the city.