There are two parts to any criminal sentence for any crime involving sex.

There’s the standard sentence: prison time or probation. As soon as the first sentence ends, the second one begins.

After getting released from prison, an ex-offender has to sign up for his state’s sex offender registry. If he moves to another state, he’ll have to sign up there too. Depending on the state and the seriousness of the crime, his name, picture, and information will be publicly listed for all to see — permanently.

It might seem like an appropriate punishment for someone like Brock Turner, who received only a few months in prison for sexually assaulting an unconscious woman earlier this year.

But the sex offender registry wasn't designed to punish people like Brock Turner. It wasn’t designed to punish people at all.

The registry was designed for "sexual predators" who repeatedly preyed on children (at least according to the fears of 1990s policymakers). The purpose was supposed to be not punishment but prevention. The theory: Sexual predators" were unable or unwilling to control their urges, and the government could not do enough to keep them away from children, so the job of avoiding "sexual predators" needed to fall to parents.

In other words, it’s a 1990s tool with a 1990s sensibility. If criminals can’t control their criminal urges, law-abiding citizens must modify their own behavior to prevent crime.

Twenty years later, the focus on sex crimes has shifted from sexual abuse of children to sexual assault and rape. The idea that criminals can’t control their behavior has been replaced by attention to the cultural and institutional failures that allow rapes to happen and go unpunished; the idea that it’s up to potential victims to change their behavior is usually criticized as victim blaming.

Yet the sex offender registry is still going strong.

It hasn’t worked as a preventive tool. Instead, it's caught up thousands of people in a tightly woven net of legal sanctions and social stigma. Registered sex offenders are constrained by where, with whom, and how they can live — then further constrained by harassment or shunning from neighbors and prejudice from employers.

Some of the people on the sex offender registry have had their lives ruined for relatively minor or harmless offenses; for example, a statutory rape case in which the victim is a high school grade younger than the offender.

Others are people like Brock Turner — people who have committed serious crimes that are nonetheless very different from the ones the registry was supposed to prevent, and which the registry might, in fact, make harder to fight.

This happens often in the criminal justice system: Something designed for one purpose ends up getting used for something else. As usual, it happened because people can't agree on what society wants to do with criminals to begin with.

Is the point of the sex offender registry to punish people for what they've done? Or is it to ensure that they don't do it again?

Sex offender registries were designed to protect children from pathological "sexual predators"

The laws governing America's sex offender registries — the Jacob Wetterling Act and Megan's Law of the 1990s, and the Adam Walsh Act of 2006 — are all named after children who were victims of violent crimes. Adam Walsh and Megan Kanka were both raped and murdered by adult men; Jacob Wetterling was abducted and has never been found.

Those were exactly the scenarios the registries were supposed to prevent, by allowing not only law enforcement but parents and others to know if any sex offenders lived or worked nearby.

Like a lot of other "seemed like a good idea at the time" tough-on-crime laws, the sex offender regime was built in the 1990s under President Bill Clinton (who signed Megan's Law in 1996). And just as other tough-on-crime laws relied on stereotypes like the "child superpredator," laws like Megan's Law were designed to contain a stereotypical "sexual predator."

The "predator" panic had been raging since the early 1980s, when several communities around the US got caught up in allegations of widespread child molestation at schools, often after children "recovered" supposedly repressed memories. (Richard Beck's 2015 book We Believe the Children is a very good critical history of this period, if you're interested.) It thrived on the anxieties of middle-class, suburban parents — who didn't live in high-crime areas themselves (even during the height of the late-20th-century crime wave) but still didn't exactly feel safe.

According to the stereotype, sexual predators preyed exclusively and deliberately on children — and, most importantly, they were pathological about it.

"Sexual offenders are different," Sen. Chuck Schumer (D-NY) said during the congressional debate over Megan's Law. "No matter what we do, the minute they get back on the restless and unrelenting prowl for children, innocent children, to molest, abuse, and in the worst cases, to kill."

In lawmakers' eyes, sex offenders could not be reformed. The only thing the government could do was help the public protect itself from them — depriving them the opportunity to commit future crimes.

Registries are not designed for rapists

It's worth noting that most sex offenses are still committed against minors (though that's partly because there are more crimes involving minors that count as sex offenses). But the definition of "sex offender," both legally and popularly, covers not just people who victimize children but a wide degree of crimes involving sex — including sexual assault and rape.

Regardless of what kind of sex offense is committed, though, all the perpetrators end up on the same list.

Some of the activists who inspired registry laws to begin with, like Nancy Wetterling (the mother of Jacob Wetterling), have since turned against them. Those advocates say they never intended for the registry to expand so far beyond child molesters — and that they certainly didn’t intend for so many people to be registered for having consensual sex as teenagers, or for pulling down their siblings’ pants as children.

But not everyone who’s been caught up in the sex offender registry has committed a nonviolent or minor crime. Some of them are people like Turner — whose crime is arguably seen as more heinous to the public (or at least some members of the public) than it might have been when Megan's Law was passed 20 years ago.

Some may not think it's exactly tragic that Turner will end up suffering from unintended consequences because he's on the registry. That doesn't change the fact that the policy was designed for a totally different kind of case: Preventing a rapist from living near an elementary school doesn’t prevent him from committing another rape. Nor does preventing him from working as a hearing aid salesman.

Even the backbone of sex offender registries — the fact that they're publicly available for community notification — makes sense in the context of serial child molestation, but not in the context of serial rape. Knowing what sort of adults live next door might help you protect your kid from getting kidnapped. But you can't Google your way to safety if — as Brock Turner's victim didn't — you don't know your assailant's name.

There's a way for law enforcement to monitor people after they’ve returned from prison, with individualized attention (and different conditions) for each individual case. It’s called parole — and more than 850,000 Americans were on it in 2014.

Preventing someone from reoffending depends on what he's done and who he is. A one-size-fits-all registry makes that impossible.

Being a registered sex offender often means the public has a right to know who you are and where you live

Every state (as required by federal law) keeps a database of people living in the state who've been convicted of sex offenses. Every state puts at least some of that database online for the public to check.

States vary in terms of how many sex offenders are publicly listed and how much information is provided. In California, for example, someone who's committed "assault with intent to rape" (like Brock Turner) gets his name, picture, and the town where he's living listed on the site, but not his address or workplace. (Sex offenders convicted of more serious crimes in California, however, do get their addresses listed.)

In some states and cities, police officers are allowed or required to notify the neighbors whenever a sex offender moves into the neighborhood. When they aren't, neighbors often step in to do the job — and, often, encourage the person to move elsewhere. (It's theoretically illegal to use the sex offender registry to discriminate against sex offenders in things like housing or jobs, but there's an exception if you're protecting the safety of a "person at risk.") Offenders are also required to change their registration within a few days of moving elsewhere or changing jobs.

The federal Adam Walsh Act set a minimum period of time that offenders had to stay on the registry, depending on the seriousness of their offense. But plenty of states require offenders to stay on for longer — many of them for life.

That's all that's officially required, at least at the federal level. But because of concern about child predators — and the sex offender registry is such a visible, readily available tool — sex offenders also have to deal with a raft of "collateral consequences": restrictions they face above and beyond their official punishment.

Laws can make it impossible for sex offenders to find housing or get a job, years after they've completed their sentences

Because sex offenders are still characterized as child predators, states and cities commonly ban them from living within a certain distance of schools, parks, day cares, or "other place(s) children may gather," in the words of the Council on State Governments. (The same logic has led dozens of states to require GPS monitoring for sex offenders.)

As of 2010, 27 states had passed some form of residency restriction on sex offenders. Hundreds of cities have done the same.

These laws are a classic case of unintended consequences, especially in urban areas where it might be hard to find housing that isn't within 2,000 feet of anywhere children may "gather."

In San Diego, a federal judge ruled that a California residency restriction law was unconstitutional in 2015. Residency restrictions consumed "huge swaths of urban and suburban San Diego" (according to the district attorney's office). Restrictions covered more than 97 percent of "multifamily" housing like apartment buildings and long-resident hotels — the places where sex offenders, who often don't have families or earn enough to live in single-family homes, tend to live.

That's over and above the typical sorts of collateral consequences — laws restricting whom sex offenders can live with, where they can be licensed to work, and what sorts of benefits they can get.

States pass all sorts of restrictions like this on people with criminal records. Individually, they often make sense — or at least they aren't objectionable. The problem is in the aggregate: They end up making it much more difficult for ex-offenders to earn a living and reintegrate into their communities. And because the sex offender registry is right there in the public eye, it's more likely to be the target of collateral consequences than most.

In California, for example, there are 239 mandatory restrictions on sex offenders. Most, again, have to do with children: Offenders can't live with an adopted child (which can preclude them from staying with relatives), can't work in public parks, and can't enter school grounds without "lawful business." But they also can't live in facilities for the chronically ill, can't drive tow trucks, and can't sell hearing aids.

And, of course, it's legal for employers to refuse to hire sex offenders even when there's no law mandating it. In a 2014 study of sex offenders in Pennsylvania, Wisconsin, and Texas, more than half of offenders said they'd lost a job due to their status; one said that he'd gotten a call from an employer telling him never to send them a résumé again.

The purpose of the registry is to use social stigma to buttress the law — which can often tip over into harassment

You don't need a sex offender registry to pass any of these laws (though the presence of a registry arguably encourages it). There are plenty of people who, after completing terms in prison, report to law enforcement on a regular basis, are monitored, and live under restrictions on where they can go and whom they can live with.

What makes the registry different is that it's public — you can't identify a parolee just by Googling him, but you can identify a sex offender. That's the entire purpose of the registry: it was supposed to give parents the tools they needed to protect their children in the face of a threat so (supposedly) rapacious that law enforcement couldn't be trusted to keep it at bay.

It's illegal for people to use sex offender registries for harassment. But they're encouraged to use them for social stigma.

The line is often crossed. The 2014 study found that more than 40 percent of offenders had been harassed in person; many had also gotten harassing mail or phone calls. Several offenders reported their families had been harassed or shunned. "People pick on my children," one respondent said. "They make jokes about me being an easy lay to my teenage sons."

But sometimes it's hard to tell the difference between harassment and a neighborhood protecting itself — just as the law says it's supposed to do. Take this one from February: A Mesa, Arizona, woman tried to start a halfway house for sex offenders, and her neighbors responded by offering to buy the house from her to keep the sex offenders out of the neighborhood; putting up "Sex Offenders, Felons and Pedophiles" signs pointing to the house; and siccing the county government on her for a licensing violation. Is that an unintended consequence, or the point of the law?

Registries don't do what they're supposed to

Policymaking is always a trade-off. The question is whether the benefits are worth the risks. The intended benefit of sex offender registries was supposed to be greater protection of children — with fewer opportunities for recidivist sexual predators to attack children, there were supposed to be fewer sex crimes against them.

That hasn't happened. The evidence on registries' ability to prevent sex crimes is mixed at best. The evidence that residential restrictions prevent sex crimes is nonexistent.

Few registered sex offenders go on to commit another sex crime — studies have estimated recidivism rates between 5 and 15 percent, which sounds high but is relatively low compared with other crimes. Barring sex offenders from living near children, for instance, doesn't stop the recidivists from recidivating. And most new sex crime convictions involve people who aren't registered sex offenders.

We know more about sex crimes now than policymakers did in 1996. The "stranger danger," child-focused predator isn't as common as people think. Sexual abuse at the hands of intimate partners and family members is far more common — and there's evidence that strict registry laws might make victims less likely to report their relatives as abusers, since they might not want the "permanent banishment" that entails.

The risks, on the other hand, have been huge. It's not an exaggeration to say that the combination of legal restrictions and social stigma destroys lives. Sarah Stillman wrote a New Yorker feature earlier this year that is a must-read if you want to understand the booby-trapped world in which sex offenders live:

One morning during her junior year, (Leah) DuBuc returned to her room from psychology class to find a yellow Post-it on her door: "We know you’re a sex offender. GET OUT OF OUR DORM. You’re not wanted here." She tore it up, and told no one. A few days later, as she sat in her room working on a paper for class, she heard a ping from her AOL Instant Messenger account. The sender was anonymous. "We know you’re a sex offender," DuBuc read. "Get out." She no longer felt safe in the dorm. But in order to rent her own apartment she’d need a decent income. She applied for jobs that interested her—working with the homeless, helping out an urban ministry—without success. Then McDonald’s, Burger King, and Subway turned her down because of her offender status.

Sex offender registries don't prevent crimes. They simply punish them.

Registries put the burden on everyone else to protect themselves from rapists

More importantly, the way we think about rape now is nothing like the way people thought about child abuse two decades ago.

Sex offender registries were supposed to be necessary because sexual predators could not be controlled or rehabilitated. The best way to stop predation was for parents to control their own behavior (and their children's) and ensure they stayed out of harm's way.

That's exactly the kind of thinking anti-rape activists have tried to fight in other arenas. They think the onus ought to be on society and institutions to teach people not to rape — not on women to learn how not to get raped.

By punishing people who commit sexual crimes by putting them on a permanent list, critics like Allegra McLeod of Georgetown Law have pointed out, the law isn’t just claiming that they’re incapable of controlling their own sexual urges (which is exactly the same thing that many rape apologists say). It’s also closing off "the varied array of other, more specific structural and institutional reformist responses that might better address the reality of sexual harm."

The existence of sex offender registries, critics point out, doesn’t change the fact that police often treat rape survivors more skeptically than victims of other crimes. It doesn’t address the failures of institutions (like universities and the military) to treat sexual assault cases with criminal seriousness. And it reinforces the very attitude that Turner, his family, and his friends demonstrated in the wake of his conviction: that a normal American man couldn’t possibly be a rapist.

The real question: What's the goal for criminals?

When it comes to people like Brock Turner, though, the question isn't really whether registering him as a sex offender will prevent future rapes. The reason people tend to believe he ought to be on the sex offender registry is that he's done something very wrong and he deserves to be punished for what he's done.

That's an important function of the criminal justice system: setting norms by setting penalties for violating them. Discussions about criminal justice reform often focus solely on incapacitating and rehabilitating criminals — preventing future crimes — and treat "punitiveness" as a bad goal to have. But it's totally acceptable to believe that because rape is wrong, Brock Turner must be punished.

But just because the sex offender registry is better at punishing people than it is at preventing crime doesn't mean it's the right way to punish people, either.

It's too light a punishment. The fact that Turner will become a registered sex offender when he leaves prison hasn't stopped people from being outraged at how little time he's spending there. Prison is typically how people are punished for serious crimes in the US; if the purpose of punishment is to signal that someone's done wrong, not putting him in prison kind of undermines that.

It's also too harsh a punishment. Most people aren't sentenced to prison for life; their punishments are only supposed to last a certain amount of time. Having your life constrained and restricted even after your sentence is over might be a fact of life in our current criminal justice system, but that's not the way punishment is supposed to work.

What is the appropriate punishment for sexual assault — and when can assaulters get the chance to learn their lesson? What is the appropriate punishment for other sex offenses? And how can we effectively prevent rape? These are good questions. But they're different questions from each other. The sex offender registry, with its one-size-fits-all approach, has pretended to answer all of them — by, in reality, answering none.