Prisons put offenders out of sight, so it’s easy to forget not only that more than 2 million people are locked up in the U.S., but also that they’re still part of the economy. And what happens in prisons touches those of us outside — sometimes even in the food we eat.

Farming used to be a much bigger part of prison labor. But thousands of inmates still grow vegetables or feed crops to sell. In the Montana prison system, they tend cattle. And while producing food products, inmates receive job training and life skills.

Cows graze on the prison’s 30,000 acres of land.

The Montana State Prison dairy is a noisy place where inmates milk cows three times a day. Twenty cows at a time walk into individual stalls where inmates dip the cows’ teats in iodine and place suctioned milkers on them.

“Average cow takes between three and six minutes to milk,” said Dave Miller, the dairy manager.

Miller said 32 inmates run the dairy and its processing plant where the milk travels by vacuumed tubes to be homogenized, pasteurized and made it into yogurt, cottage cheese and ice cream. But around 85 percent of the milk is sold to a national wholesale dairy company, slipping into our cereal bowls and coffee mugs alongside milk from regular dairies.

The dairy is just one part of Montana Correctional Enterprises’ cattle operation. Prisoners also raise beef cattle. Inmates herd some 2,000 cows grazing on 30,000 acres of alfalfa, rye and other cover crops.

Clyde Johnson, 49, is on the cowboy crew, caring for and herding the cows. He was 27 when he entered prison on multiple convictions from two serious, violent crimes: shooting and rape. On any given workday, you can find Johnson on one of the prison’s 40 horses.

Johnson named the horses: “We have Trigger, Copper, Billie Buck, Blackie, Peppy, Hickory, Bullseye.”

Johnson also doctors cows, including aiding in birth. Sometimes, he said, “You have to literally stick your hands in there, pull it out. You just look at them little cows, and how can you not cheer up when you see em get up for the first time?”

Cows are milked in the vacuum powered milking parlor three times a day.

Johnson had to work hard to get this job. It took him 13 years of good conduct. He loves working with animals.

“They’re never in a bad mood hardly,” Johnson said. “Like your horse. He’s never mad at you. He’s never grumpy.”

Johnson makes around $1 an hour, the prison’s top wage. He said working on the cowboy crew is hard on his body. He’s separated his shoulder, broken his sternum, but he’s learned a lot: how to do essential farming tasks, like artificially inseminate a cow. But he’s also learned a good work ethic and empathy. And there’s nothing like catching a just-born, soaking-wet calf in the freezing Montana winter. These are things he plans to talk about at his next parole hearing in 2020.

In Montana, Johnson’s training is highly marketable. Ranchers call the prison just about every month looking for skilled inmates who are about to be released. Plus, landing a job on the outside significantly lowers the chance an inmate will end up back in prison.

Every fall, a few hundred cattle leave Johnson’s care en route to the dinner table.

The first step is the cattle auction. Buyers from all over the country purchase thousands of cows, which come with papers, like a car, detailing their breed, weight, what they’ve been eating and where they were raised.

Buyers fatten up their cattle, mostly in feedlots, and then truck them to packing houses where cows are slaughtered. And this is where details of a cow’s birthplace, say a prison ranch, can easily slip from sight.

Food coming from a prison? It’s not necessarily a selling point.

A few years ago, when Colorado Whole Foods sold goat cheese made by inmates earning pennies an hour, consumers were outraged. Many shoppers didn’t want to support what they considered exploitative labor.

Rayburn Smith, who sells cattle for the Louisiana Department of Corrections, said it’s extremely common for some labels earned in prison ranches — like all natural or grass fed — to follow the cows, because those labels get top dollar. But “prison raised”?

“I’ve never seen anything say they were raised in a prison,” Smith said. “You know, if there was an incentive to say it was raised in a prison, then we would probably sell it that way.”

In fact, there’s incentive to keep prison origins quiet. Officials in charge of Montana’s prison ranch worry that if the general public finds out their beef or milk comes from a prison, they’ll want to shut down the programs — food and job training — without really knowing about them.

Many people recoil from prisons. They don’t want a connection to them, especially one as personal as food. But for some inmates who produce that food, doing so is a lifeline to rehabilitation, a way to move forward with their lives.

This story was reported with support from the University of California Berkeley 11th Hour Food and Farming Journalism Fellowship.