https://en.wikipedia.org/wiki/Wickard_v._Filburn
"An Ohio farmer, Roscoe Filburn, was growing wheat for use to feed animals on his own farm. The U.S. government had established limits on wheat production based on acreage owned by a farmer, in order to stabilize wheat prices and supplies. In 1941 Filburn grew more than the limits permitted and he was ordered to pay a penalty of $117.11. "
After all, that food you raised for yourself prevented you from needing to buy food from another state, and so, well....
We already have numerous such restrictions (e.g., brewing beer).
A key point in this, in fact, was that it doesn't matter if it's being produced for your own (animals) consumption vs. for sale.
But that has nothing to do with whether the pure act of raising your own food is restraint of trade, absent restrictions on production. If you were raising the food in a way that it was legal to sell it, you're raising it in a way that's legal for your own animals to eat as well.
It's very easy for an agricultural industry to go through cycles of overproduction which drive people into bankruptcy (and sometimes suicide), then shortage resulting in high prices.
Having poor transport links (often the case in rural Africa) makes the problem worse, as this instability plays out in each little isolated market.