Gardens are a thing, and you do not need your house to be on agricultural land to grow a garden, at least in my state.
Most people don't have that, and can't afford that, hence why they take the route of earning money some other way, and using the money to buy food made by others, from supermarkets. They can supplement their diet with home-grown fruit and veg, but few can sustain their family on home-grown produce.