Prisons were a lot cheaper when they were self supporting.
I grew up near Southern Michigan state prison and they farmed several thousand acres. They produced all of their own food plus food for the Jackson county jail as well as ran a roadside vegetable stand. They baked thousands of loaves of bread every week.
When Is was a kindergartner I remember the prisoners working in the field right next to our house. I used to take my toy shotgun out and walk the 2 strand barbed wire fence with the guard on the other side of the fence with his shotgun.
The quality of the meat produced there is so high that the meat is sold on the open market and cheaper meat is feed to the prisoners.