True... the number of farmers and the number of farms continue to decline.

But everyone has to eat, including inmates. The prison farms produced meat, vegetables and dairy products for the local inmate population (Kingston once had at least 7 federal institutions). 

Furthermore, the skills that an inmate (or anyone) can learn on a farm are extensive and highly applicable: machinery maintenance & repair, welding, fencing & building, animal husbandry & vet care, feeding & nutrition, milking & sanitation, planting & fertilizing & harvesting, greenhouse work, egg grading, etc.

Plus learning fundamental work habits like rolling out of bed & showing up on time, completing the task you are assigned, accepting responsibility for your mistakes, etc.

What's often overlooked is that many of these guys are doing time because they had a hard time getting along with people. Driving a tractor for hours gives a person plenty of time to think & reflect, free of intrusions and interpersonal hassles.