Prisoners don't just sit in their cell for five to ten years in this trope. Rather, they are put to work at something repetitive, tiring, or both.
Truth in Television. Victorian prisons would normally put weaker prisoners to work picking oakum (unraveling old ropes for reuse as ship caulking), and stronger prisoners would spend their days moving rocks or cannonballs or walking on the treadwheel. Modern examples include stamping license plates (or screen-printing them nowadays), breaking boulders into smaller rocks, and picking up trash/digging weeds along the roads. This trope does not require that the work actually be productive; a Victorian punishment job was using a crank to stir sand in a barrel. Working on the Chain Gang is a subtrope covering those cases when a group of (usually) male prisoners would be chained together to perform some task.
A variant form of this trope is when prisoners of war are compelled to work. The Laws and Customs of War limit what POWs can be made to do for their captors, but fiction tends to stretch the rules for drama.
Prison labor has become controversial in recent years. Manufacturers object to prisoner-made items being sold on the open market, because prisoners don't have to be paid and their products can thus be sold for much less. That bit about not paying prisoners for their labor tends to remind a lot of people of the bad old days of officially enshrined slavery — especially given the now-banned practice in the American South of leasing groups of black prisoners (purely coincidence, of course) to white plantation or factory owners, and the disproportionate presence of underprivileged ethnic minorities in prisons to this day. For these reasons, No Real Life Examples, Please!
- The Great Hell Castle by Hiroshi Hirata has a Japanese lord order the prisoners of his castle to dig out a huge pit, then quarry and bring in huge boulders to line the walls and make it watertight, then carry water up a cliff and fill in the pit. When the backbreaking effort is done, having taken many prisoners with it, he orders them to empty the water, destroy the walls, and fill it in, killing those who protest. This is done multiple times over fifteen years, with the promise that those who survive (many die from the work and the harsh overseers, others commit suicide) will become samurai.
- Happens in Lucky Luke: prisoners are set to work breaking rocks (we never see what the gravel is used for). One story featured a prisoner named Joe Milton who'd gotten so used to breaking rocks he shaped them into little cubes or made ashtrays, while another in Alcatraz has the prisoners swing their hammers simultaneously, causing earthquakes.
- Shows up in two Star Wars fics:
- Going Solo: Luke, Han and Leia are being made to haul rocks until Han, who already has an injured arm with a knife tip still embedded, passes out. Then the focus shifts to basically how much the Mad Doctor can torture Han while 'treating' it and the gang escaping.
- The Jedi Way: Sacrifice: Obi-Wan and Qui-Gon are being forced to work. The trouble is, Qui-Gon breaks his previously injured knee. Obi-Wan tries to do both his work and his Master's so Qui-Gon won't starve, but it soon becomes too much and Qui-Gon executes an escape plan before Obi-Wan dies on him.
- O Brother, Where Art Thou? opens on our three protagonists escaping from a chain gang. The soundtrack features a recording of an actual dust-bowl-era chain gang singing a work song.
- Rambo is shown doing the "making big rocks into little rocks" bit with a sledgehammer for his stunts in First Blood.
- Megamind: The title character lands in a prison and is set to work making license plates.
- Superman II: While they're incarcerated in Metropolis Prison, Lex Luthor and his henchman Otis work in the prison laundry.
- Take the Money and Run: Woody Allen's character works in the prison laundry, where he steals t-shirts for a proposed prison escape by putting them on. He builds up so many layers he ends up looking like a bodybuilder from the waist up.
- The Shawshank Redemption has the prison use inmates for cheap labour.
- The Bridge on the River Kwai: Captured British soldiers are forced to build a railroad bridge.
- Phantom of the Paradise: After Winslow Leech is jailed on trumped-up charges, he's forced to work a record press.
- Robin Hood: After King Richard comes back, Prince John is seen in prison garb breaking boulders. One of the boulders falls on his foot as a final indignity.
- Escape from Alcatraz: Getting a job in one of the workshops is a privilege that the prisoners have to earn, but most want to since it beats just sitting in one's cell. Frank Morris gets a job in the carpentry section, for instance.
- The Getaway: The opening credits montage showcases the prison routine of "Doc" (Steve McQueen's character), which includes him working on a license plate line.
- Cool Hand Luke: The central premise is Luke being forced to work on a chain gang and refusing to submit to the authority of the wardens. He's punished to work even more arduous tasks when he gets in trouble or tries to escape.
- In the Escape from Furnace series, prisoners in the eponymous 'Furnace' prison are forced to use pickaxes to mine out new rooms in order to expand the place (the prison is located underground).
- One Day in the Life of Ivan Denisovich: The Gulag prisoners have to build the walls of a new building, and the main character mentions another labor camp where he had to cut trees.
- Holes: Though more a correctional facility than a prison, the delinquents sent to Camp Green Lake are made to dig very precise holes in the ground from practically dawn until dusk under the pretense of building character. It's actually so the Warden, who owns the land, can find an outlaw's treasure that was buried in the area.
- In The Wheel of Time:
- The Aiel Proud Warrior Race have two versions:
- Those who are captured in battle are obligated to serve as gai'shain, obeying their captors faithfully and peacefully for a year and a day to restore their lost honour.
- The lowest criminals are deemed da'tsang, "Despised Ones" who perform unnecessary labor in full view of the community. This is always obviously pointless make-work like moving piles of rock back and forth; they are forbidden from doing anything at all worthwhile, to emphasize the depth of their shame.
- The highest punishment in the Aes Sedai Magical Society is to be De-Powered and consigned to a lifetime of menial labour. This is more to ruin their image than to punish them personally: an exiled or executed leader might inspire a rebellion, but no one will follow a scullery maid.
- The Aiel Proud Warrior Race have two versions:
- In The Handmaid's Tale and the adaptation, the particular way that the U.S. fell involved a lot of environmental destruction and toxic waste as well as becoming a theocratic No Woman's Land, so the task of cleaning up the contaminated areas falls on infertile and rebellious "Unwomen", most of whom die there.
- Oz: The prison industry is a dress factory. Anyone who doesn't have a job elsewhere in the prison (mail room, kitchen, etc.) ends up working there.
- Breakout Kings: In the pilot episode, the escapee works making licence plates in the prison workshop. He saves up the rejected plates and uses them to construct a shield that he uses to hide his presence when he breaks out via an Underside Ride.
- On Orange Is the New Black, Piper is assigned to electrical work, along with Nicky, who spends the time drilling a hole into the wall. Later, when Litchfield is privatized, a lingerie company contracts its manufacturing to the prison, which becomes a major plot point in seasons 3 and 4.
- Get Shorty: Miles and Yago get jobs bagging little plastic toy Oscar awards. The wardens are careful to prevent prisoners from stealing the toys, which puzzles Miles until he finds out that prisoners sharpen them to make shivs.
- Escape at Dannemora: Prisoners Matt and Sweat make pants in the prison workshop, which is how they know Tilly, the supervisor whom they both seduce as a prelude to enlisting her help in escaping. Based on a true story.
- The Outer Limits (1995): In "Small Friends", Professor Gene Morton works in the laboratory attached to the prison, where he developed the Micro Electro Mechanical Systems (MEMS). His work in the lab has granted him certain privileges.
- Call of Cthulhu: The supplement Cthulhu Companion: Ghastly Adventures and Erudite Lore includes a list of jobs prisoners can perform in its article on prisons.
Big House State Pen (U.S.). The prisoners work on various state contracts, such as making license plates.
Wayshearn Co. Work Farm (U.S.). The prisoners are put on standard chain gangs repairing county roads.
Boleta Ocho (Latin America). Sometimes a wealthy person will draft a hundred or so prisoners to work on a bridge or road, cut sugar cane or fight a fire.
- SimCity 3000: The maximum security prison gives the fun statistic "license plates created".
- One of the Game Over screens in Amazon: Guardians Of Eden mentions spending your days in jail stamping out license plates.
- Randal's Monday: Randal is assigned to gardening duty during the prison chapter.
- Prisoners at Sunstone Rock in Horizon Zero Dawn apparently have to tend the fields around the prison, though when Aloy visits it's on lockdown. From the sound of things, some of the prisoners enjoy being set to farming.
- Girl Genius: Prisoners are shipped from across Europa to (try to) repair Castle Heterodyne, a sentient and insane castle full of deathtraps. In principle, it's a fair sentence; Klaus only sends the most incorrigible criminals there, and their repair efforts directly deduct from their sentence. In practice, it's a death sentence with delay; the castle is ridiculously hazardous at the best of times, but given that there's a serious taboo against totaling one's points out loud it's likely the blasted psychopathic junkheap does its best to kill those about to finish their sentences. Only a single person has ever been stated to have made it out alive.
- The Fairly OddParents!: The kids' play area is depicted as a prison, complete with license plate stamping machine.
- SpongeBob SquarePants: When Mrs. Puff goes to prison, she's shown chipping at large boulders at one point.
- Johnny Bravo: While an inmate, Johnny is told to chip a large boulder apart, glue it back together, then chip it up again.
- The Simpsons: Sideshow Bob works making license plates with "RIP BART" "DIE BART" "BART DOA" and "IH8 BART" on them.
- The Looney Tunes Show: Lampshaded by Bugs Bunny in the episode "Jailbird and Jailbunny".
Bugs: Excuse me, but what are we doing here? Are we building something or are we just making big rocks into little rocks?
- On CatDog, the titular CatDog and several other characters are seen breaking up chlorine tablets for breaking pool rules.
- Totally Spies!: In "Evil Professor", after Sam says that the girls need to get part-time jobs in order to keep their penthouse suite, the three get an Imagine Spot of them dressed in prison stripes and breaking rocks with mallets.