1. The black market economy in prison is substantial, and it is a testament to the ability of entrepreneurial individuals to provide people's needs in a marketplace, even ones as restricted as this. For example, despite this funny, off-color video from the Onion, a recent indictment against the Black Guerrilla Family prison gangs reveals that inmates have access to fine cigars, salmon, shrimps, Grey Goose Vodka, and other items not provided legally within the prison. This isn't uncommon either. Even within the notorious Confederate Andersonville prison camp, a market for goods and housing sprang up. From San Quentin to Baltimore County, prisons and jails are stocked full of contraband goods for convicts.
2. As predicted by theories of the underground economy, corruption often follows. Prison guards receive substantial cash payments for taking both an active and passive role in facilitating the importation of goods into prison. Some guards even exchange sexual services for money, and one female officer (now fired) sent provocative photos to inmates. She's caught on a police wire tap explaining the allure of profits to an inmate: "That job was cool while it lasted. But that s--- like having a McDonald's job, I got to break the law to get money." One of the challenges of prison operations is outlawing goods that are dangerous to guards and inmates while at the same time ensuring that guards are not tempted by offers of thousands of dollars for smuggling in, for example, small packages of heroin.
3. As correctional facilities provide no enforcement of illicit contracts (or even people's personal property rights to a substantial extent), it is not surprising to see organized crime arise. Historically, organized crime provides protection and enforces contracts (see Gambetta, Bandiera, Milhaupt and West, Skaperdas, and others). The Black Guerrilla Family provides protection to people who pay for it, and they are a major player in the prison economy. After grouping together, this enterprise has low costs of enacting violence on others, and a result, the likelihood that a trading partner engages in some sort of fraud or post-contractual opportunism is diminished. When legitimiate institutions are prevented from aiding trade, alternative mechanisms will be discovered.
4. Finally, though incarcerated inmates are capable of both extorting and controlling criminal activity on the streets. The small size of cell phones makes it easy to smuggle them into prison, and this allows incarcerated gang leaders to stay in control of criminal enterprises. Also, I've argued before, criminals who are not active in prison gangs are also forced to make extortion payments to them. Analogous in many ways to governments (argued by Baumol, Skaperdas and others), gangs act similar to governments by providing public goods, demanding tax payments, and enforcing contracts for a price.