At the first presidential debate of the 2012 campaign, former New Mexico Gov. Gary Johnson implored Republican voters to conduct a "cost-benefit analysis" of the criminal justice system. "Half of what we spend on law enforcement, the courts, and the prisons is drug related, and to what end?" Johnson asked a South Carolina audience in May. "We're arresting 1.8 million a year in this country; we now have 2.3 million people behind bars in this country. We have the highest incarceration rate of any country in the world. I would ask people to look at this issue; see if they don't come to the same conclusion that I did, and that is that 90 percent of the drug problem is prohibition-related."

The ends of justice, Johnson argues, have not justified the means of prosecution. This issue of reason is a detailed brief in support of that thesis. A system designed to protect the innocent has instead become a menagerie to imprison them. A legal code designed to proscribe specific behavior has instead become a vast, vague, and unpredictable invitation to selective enforcement. Public servants who swear on the Constitution to uphold the highest principles of justice go out of their way to stop prisoners from using DNA evidence to show they were wrongly convicted. Even before you start debating the means of the four-decade crackdown on crime and drugs, it's important to acknowledge that the ends are riddled with serious problems.

America has one-quarter of the world's prisoners. More than 7 million people are under correctional supervision in this country. These staggering statistics—no other country comes close in percentage terms, let alone raw numbers—have serious consequences. For one thing, there is the fiscal cost: The corrections system lags only Medicaid in government spending growth on the state level. Yet most prisons are overcrowded, underserviced, and exponentially more dangerous than any decent society should tolerate.

Worse are the cascading social effects, some of which you might not initially expect. Although prison is overwhelmingly the province of men, black women in America's inner cities have some of the highest HIV infection rates in the developed world. Why? Because their male partners contracted the virus behind bars, via consensual sex or rape, often going undiagnosed while serving out their terms.

Very few in our political and media classes are familiar with the communities most ravaged by crime and punishment. No politician ever lost an election by alienating the ex-con vote (in no small part because in a dozen states, ex-felons who have completed parole are still permanently barred from voting). It is no accident that the people most likely to languish behind bars—poor minorities, sex offenders, illegal immigrants—tend to be among the most reviled groups in American society.

To the extent that we even think about our prison population bomb, we have allowed ourselves to believe it's an acceptable price to pay for the recent reduction in crime. But the rates of incarceration and crime aren't so easily correlated, let alone quantified in terms of cause and effect. And the notion that we are keeping dangerous predators off the streets is belied by the fact that an estimated 1 million prisoners in the U.S. are serving time for nonviolent offenses, predominantly related to drugs.

The drug war is a leading supplier to the prison industry and the biggest inspiration for new ways to circumvent the Fourth Amendment. More than 800,000 people are still arrested each year for marijuana alone, despite the widespread misconception that pot has been largely decriminalized, and despite the fact that close to half of all Americans by now have smoked it, and more than half, by some surveys, favor legalizing it. We can thank the drug war for "stop-and-frisk" harassment of young New Yorkers, for the transfer of military equipment and tactics to local police departments, for wrong-door SWAT raids that kill innocents, for an entire shadow economy of dubious jailhouse snitching and back-room sentence reductions. Vanishingly few public officials even pretend anymore that the drug war can somehow be "won."

Meanwhile, government at every level continues to run out of money. So conditions are becoming increasingly ripe for a Johnsonian cost-benefit analysis to conclude that drug prohibition needs to go the way of alcohol prohibition. It remains my hope, even my conviction, that these hardheaded arguments will reverse this evil policy during the next decade or two.

Yet we can't assess the corrosive and life-destroying faults of the criminal justice system—and our complicity in creating them—merely by looking at the bottom line of a spreadsheet. Americans have created a system in which criminals who have served their sentences can still expect to remain incarcerated for life. Voters continue to reward prosecutors who are notorious for locking up innocent people. Our periodic national panics about terrorism and immigration have created a system where defendants do not have access to a public lawyer, prisoners can rot indefinitely, and 30-year residents of the U.S. can get deported for Reagan-era misdemeanors.

Why did all this happen? Because we let ourselves be OK with the ends justifying the means.

Would you torture a terrorist suspect if he could reveal enough information to prevent a ticking time bomb from exploding in a big city? That was the armchair interrogator's debate question eight years ago, recently revived when a variety of U.S. intelligence sources finally pinpointed the hiding place of 9/11 mastermind Osama bin Laden. It was the intellectual successor of CNN anchor Bernard Shaw's famous debate question to 1988 Democratic presidential nominee Michael Dukakis: "Governor, if Kitty Dukakis were raped and murdered, would you favor an irrevocable death penalty for the killer?"

These questions are intended not to further discussion but to end it. Only a monster would oppose either final retribution or preventive action against those who murder innocents. Even though the examples are always and necessarily fictional, these are the ultimate in cost-benefit analysis and base emotionalism. The mind-set behind them has dominated America's policies for using deadly government force for decades.

That's why I'm grateful that Gary Johnson wasn't the only libertarian-leaning candidate at the first GOP debate in South Carolina. Before the former New Mexico governor gave his hardheaded consequentialist answer to the drug war question, Rep. Ron Paul (R-Texas), who has always been more interested in principle than pragmatism, gave perhaps the most unusual answer in presidential campaign history. When asked about legalizing heroin, Paul analogized personal drug use to freedom of religion. When the stunned panelist asked him whether he had indeed just cited heroin use as an example of liberty, Paul said yes.

"What you're inferring is that if we legalize heroin tomorrow everybody would use heroin," Paul said. "How many people would use heroin if it's legal? I bet nobody here would use heroin or say, 'Oh yeah, I want heroin, I need the government to protect me, so I need these laws.'?" Shockingly—and refreshingly—the comment drew some of the biggest applause of the night.

Now that the ends of our criminal justice system have produced the kind of outrages documented throughout this special issue, it's long past time to reform the means. But those changes won't last unless we reform ourselves. It is an unpopular and even counterintuitive notion that the ends don't justify the means, particularly when the ends turn out well. But real justice is not a popularity contest.

Matt Welch (matt.welch@reason.com) is editor in chief of reason.