"When will the authorities of Tamriel learn? If you keep locking people up for minor adventure-related crimes, they'll just be surrounded by other adventurers and be more likely to adventure again when they get out."
One of the few things we seem to know for sure after the ending of The Usual Suspects is that the group of crooks met while they were all being held and questioned by the NYPD. This did include sharing a large cell/holding room where they began plotting how to strike back at the NYPD.
The original The Inglorious Bastards has the heroes meeting as U.S. Army prisoners who escape and try to make their way to Switzerland.
The Dirty Dozen are all in prison for various crimes. That's why they are picked for the suicide mission, since it's their only hope to avoid a long prison term or death sentence. They don't meet each other there, but we are introduced to them there, as the commander offers each one the mission.
The Breakfast Club has a high school variant where a group of students meeting in a detention and becoming friends who otherwise would never have come together. It's practically lampshaded when one character confronts the two "popular" kids about how they will probably go back to treating the others like social outcasts again if they were to meet in the halls with their other friends around.
TRON: Tron, Ram, and Flynn are thrown into adjacent cells on the Game Grid.
Guardians of the Galaxy provides a partial example: four of the five members of the titular group encounter each other when two of the group (Rocket and Groot) try to kidnap the third (Peter Quill) for a bounty on his head, while he in turn was fighting with the fourth (Gamora) over the Maguffin of the movie. Subsequently, all four are sent to the same prison, where they encounter their fifth member (Drax) and realize they need to work together to escape and accomplish their various objectives
Martin and Gonff meet this way in Brian Jacques' Mossflower.
'The premise of The Twilight Zone episode "Five Characters in Search of an Exit": An Army major wakes up to find himself trapped inside in a large metal cylinder, along with a hobo, a ballet dancer, a bagpiper, and a clown. None of them have any memory of who they are or how they got there.
The original cast of Blake's 7 (with one exception, introduced later) were all prisoners on a prison ship, Moya.
Farscape: the main characters all meet on a prison ship. Specifically, John Crichton meets D'Argo, Zhaan, and Rygel when they've liberated Pilot from Peacekeeper control, with Crichton warping in between the pitched battle between Moya and the Peacekeeper ships trying to re-take it. Peacekeeper Aeryn Sun's ship is accidentally caught up with Moya when it warps away. They eventually decide to work together to avoid re-capture by the Peacekeepers.
The Lone Gunmen: While Langly and Frohike were business rivals (they sold bootleg cable), the Gunmen only solidified into a unit once they found themselves in the custody of Baltimore PD for their failed attempt to expose a conspiracy to test a mind-control drug on the unsuspecting public.
Robin of Sherwood: Robin's initial band of Merry Men is made up of the prisoners who happened to be in Robin's cell when he and Much were arrested for poaching, who escaped with him (one elderly prisoner refused to leave his pet rat behind, and stayed behind)
Module A4 In the Dungeons of the Slave Lords, which starts out in, well, Exactly What It Says on the Tin. Somewhat justified in that the previous module ended with the PC party being captured by the Slave Lords.
Module Escape from Zanzer's Dungeon starts with the characters in jail, kidnapped to be slave workers in a underground salt mine. The module is designed for new players and avoids the standard You All Meet in an Inn opening.
Deadlands example: In the Devil's Canyon adventure, the posse wakes up alone in a cabin in the back country, with no memory of how they got there. Doesn't seem like much of an example, until most of the way through the adventure. Turns out they're all dead. Their "dark half" was in control when they were captured, explaining the amnesia...and how this example fits being held against your will.
Black Crusade has the introductory adventure Broken Chains. It's a fairly standard You All Meet In A Cell, except that a) The cell is part of a huge dilapidated space ship and b) the PCs entirely deserve being in a cell, as the sample characters include an extreme Blood Knight, a scheming Space Marinethat was exiled from his own legion, a former Rogue Trader who tried to kill her brother through a daemonic assassin for the inheritance and a Mad Scientist experimenting with fusing daemonic flesh to mortals.
The 3rd party Path Finder adventure "Way of the Wicked" starts this way. The PCs are all convicted felons, usually sentenced to die. (It's an evil-aligned adventure.)
Arx Fatalis starts the player off in a cell in a goblin fortress with no knowledge of who you are or why you're there.
In Baldur's Gate 2, finding out why you were imprisoned and experimented upon by the Big Bad is actually a major part of the plot.
Most The Elder Scrolls games start off with this. As the protagonist is always a Featureless Protagonist (or rather Choose Your Own Age, Face, Gender, etc) whose actions and personality are entirely up to you and with the Elder Scroll games being so open-ended, your character's origins have to be open-ended, too. Your character might be a thieving murdering bastard who got caught, or they might be a paragon of righteousness who was wrongfully imprisoned, or they might not even know themselves.
In Arena, your character is in prison because you had incurred the displeasure of the Big Bad.
In Daggerfall, your character suffered a shipwreck and found him/herself washed up in a cave that connected to a dungeon. Not technically a prisoner, but it amounts to the same thing.
Though Daggerfall also provides a biography that explains exactly why the Emperor trusted you with the mission that led to the shipwreck. To not be overly determinative, it has many, many variations depending on class and other choices during character creation.
In Morrowind you start as a prisoner aboard an imperial ship, you are about to be released. The first spoken words in the game are the daedra Azura speaking to you in a dream, saying: "They have taken you from the Imperial City's prison".
In Oblivion, it seems that no-one actually knows how the protagonist ended up in that cell. The guards comment that the cell is always supposed to be empty, while the protagonist actually has to ask how they got there. Given the Emperor having visions of your arrival, it's heavily implied that some divine interference is the cause.
To the surprise of none, you begin your adventures in Skyrim as a prisoner...and you're on your way to be executed after being mistaken for a rebel. But don't worry about that, as you get saved by the Big Bad showing up and trying to kill you.
The popular "Live Another Life" Game Mod for Skyrim also starts you off in another cell, where you can choose to start the game as any number of roles and in a number of places... or you can just opt to break out of the cell with no real explanation as to why you're locked up in an abandoned, ghost-filled ruin in the first place, with the whole thing placing a huge lampshade on the situation.
Escape from Monkey Island began with Guybrush tied to the mast of his own ship, while Elaine and the others repelled a pirate attack.
Fallout 3: As a change from the previous two games (and the eventual third), which all begin with striking out from your Doomed Hometown, Black Isle's canceled game was going to start out with you in a prison cell, until something makes a hole in the wall.
The expansion Mothership Zeta starts off like this, and you have to team up with various other abductees who otherwise have nothing in common with you, or each other. One doesn't even speak the same language as the rest of you.
Rayman 2: The Great Escape begins with Globox freeing Rayman from a prison cell.
Seiken Densetsu 3. You get your final party member while in a cell in Castle City Jad unless you chose Carlie to be third (in which case the fourth would-be party member will act as an NPC). Different in that you've already played long enough to beat the first boss before you end up in a cell.
Interestingly, this trope gets mixed with You All Meet in an Inn within the same town, as every playable character except Carlie appears in that town for their own reasons at the start of the game, just in time for the beastmen to put the whole city on lockdown.
The trope gets parodied as well since the cell doesn't actually hold the party up; a dimwitted beastman comes in and immediatly gets pulled into freeing the party. Best variant being Angela who flaunts her... female assets.
Unreal begins with the player's character regaining consciousness after the ship, which was transporting him/her to a prison planet, crashes on Na Pali, killing (almost) every other passenger and conveniently enabling the player's escape.
Exile/Avernum begins with the group being thrown into a gigantic underground prison complex together. In later games, the group apparently got together deliberately.
You meet everyone in prison. The entire game takes place in that gigantic underground prison complex. Your party, however, was thrown in at the same time, although not necessarily because they were arrested at the same time, in the same place, or for the same reasons.
In the second game, the PCs are part of the Avernite armed forces - whether they banded up themselves, or were assigned to each other by the military is left to imagination. In the third game, the situation is similar - only this time, they're the back-up surface explorers acting on behalf of the Avernite government.
Legerdemain. You start the game in "The Jails of the Doobah Boogadah II", and the beginning of the game involves breaking out.
In SaGa Frontier, Emelia begins her story in Despair, a supermax prison, wrongfully accused of her fiance's murder. She breaks out accompanied by Anne and Lisa. (Ironically, in anyone else's story, Anne would help you break into Despair during the Rune Quest.)
Early on in Tales of Vesperia the main character, Yuri, is placed in the Imperial City's prison. The person in the cell next to him is a man named Raven, later revealed to be Schwann, a captain of the Imperial Knights. He helps Yuri escape, and several hours of gameplay later he becomes your last party member.
Practically the plot of the first Riddick game, starting off with our man in restraints being transferred to the game's titular prison planet in a drop shuttle. 'Course, he meets a lot of people, but none of them really stay alive, and guess how long he stays in the cell?...
The Suffering opens with the main character being checked into his cell on death row at Abbot Penitentiary. Then an earthquake hits, and hideous monsters emerge from the woodwork and start killing people.
The eponymous protagonist of the Sonny games wakes up aboard a research vessel out in the middle of nowhere with no memory of what happened prior to that point in time. Escaping the research ship is the first zone of the first game. The second game somewhat inverts this by having the player character and his partner break into a prison after a biker steals a cassette tape from the pair and enter the prison to escape them.
Dark Souls has you start off locked away in the Northern Undead Asylum, where Undead such as yourself are locked away from the world, until a mysterious knight drops a corpse with a key on it into your cell.
The whole point of the Action RPGLegend of Grimrock. Your four characters are literally tossed into the eponymous dungeon for unspecified crimes. If you can get out of the dungeon (in both meanings of the word) you are free to go. Too bad no one has done so yet...
In Pirate 101 the player starts off in a cell aboard an Armada ship for one of five crimes which is used to determine the player's character class. They meet and rescue their first companion here.
Gothic starts with the hero being thrown into a penal mining colony. The first game takes place entirely in that colony, the second and third have many NPCs you've first met in the colony.
For Batman: Arkham City, you first get control of Batman when he is in his Bruce Wayne persona in Hugo Strange's custody at the base of Wonder Tower. However, this was all a ruse orchestrated by Batman so that he could get into Arkham City while keeping people from wondering about Wayne's whereabouts during that time; once the Penguin has brought him into the middle of the place, he stops holding back against his attackers and gets to a place where he can have his Batsuit airdropped.
Gears of War has Marcus Fenix freed from his jail cell in the beginning of the game by his friend Dom, who also arms him for the incoming Locust.
Cleverly used in Escape from Butcher Bay. The tutorial consists of Riddick arriving at the titular prison and promptly making his escape - only to reveal that his escape plan was All Just a Dream, upon which the game begins proper.
Kingdom Hearts II is an unusual case where you start a level in prison, rather than the game itself. Your team is digitalized into a computer and put in its prison after an accident involving "a small, fluffy alien". The events of this level is to escape the computer with the help of a friendly program, also a prisoner, who joins the party.
Del Cottonwood is captured by outlaws and thrown into the dungeon of Castle Shadowgate; the magician Agaar is his nearest cellmate and was similarly imprisoned for no good reason.
Mystic Ark plays with this. Every characters are trapped in some sort of wooden figurines inside an abanddoned mansion. Characters never interact with each other up until you free and put them into your team. Even then...
Seems to be a trend for Dubious Company's pirates. Walter and Tiren meet when she wakes up in his brig. They meet Elly while breaking out of Barry's brig. Sal introduces herself to Tiren in Izor's bastille. Leeroy is introduced when he mistakes the pirates for Sal's captors, instead of her rescuers. They even meet the Sues and Stus while breaking out of the bastille.
In The Mr Men Movie, Mr. Nervous meets Mr. Impossible after Mr. Mean puts him in the same cell as Mr. Impossible. Mr. Impossible, being Mr. Impossible, helps Mr. Nervous escape by walking through the wall with him.
In Animaniacs, Rita and Runt first meet in the city pound.
"Return to the Nightosphere": Finn and Jake are in a cage in the Nightosphere, and spend the rest of the episode trying to get back home.
"Mystery Dungeon": Ice King, Tree Trunks, Lemongrab, NEPTR and Shelby wake up in a dungeon and try to get to the center room. It turns out Ice King was using them to get to a wizard trapped in the center of the dungeon, so he would bring his Fan Fic to life.
Justice League Unlimited S 2 E 4 Task Force X Lawton and Flag meet in Death Row. Then they met the rest of the Suicide Squad at an Abandoned Warehouse. Lawton can believe he could do the job and leave. He is a Boxed Crook and for five years, anywhere he is, he would be in a cell.