The facts of this case are outrageous, but sadly, they’re not the product of any single bad actor or law. On the contrary, they reflect a criminal justice system that’s structurally broken at almost every level. And the only reason that police never obtained the pictures they demanded under court order from Sims was that there was a massive public outcry after news reports emerged about the case in 2014, and the police let the search warrant expire. (Sims, however, continued to face felony charges for sexting his girlfriend, eventually living under probation for a year before the courts dismissed those charges.)

It wasn’t until this month — more than three years after Sims was taken to that locker room — that a federal appeals court issued a decision in his favor: By a divided 2–1 vote, the court held that a reasonable police officer should have known it was unlawful to order a teenage boy to masturbate in front of him and other officers.

Notably, though, that meant that one judge felt that police should, indeed, have the right to do force children to masturbate in front of them in order to incriminate themselves.

First and foremost, the fact that Sims’ initial conduct was criminalized at all speaks to the staggering breadth of substantive overcriminalization. The activity for which Sims was charged was a consensual, mutual exchange of nude pictures and videos between two teenagers in a lawful relationship (in Virginia, it’s legal for a 17‐​year‐​old and 15‐​year‐​old to have sex).

Sexting between teenagers is commonplace, and often an innocuous part of flirtation and sexual expression in the digital age. If the taking of or delivery of pictures were non‐​consensual, or if one party was of the age of majority, that would be a legal issue to address; for parents, such behavior might well be concerning, if not deserving of some proportionate punishment. But to brand Sims a child pornographer under Virginia law is to say that a teenager’s consensual, (mostly) non‐​harmful conduct merits one of our society’s most severe punishments and social stigmas.

The criminal law is a blunt instrument and incarceration is an extreme remedy; both are poorly equipped to address nuanced social problems and should be a last resort for the most dangerous antisocial behavior. Instead, they’ve become the reflexive default for any behavior that certain segments of society find problematic.

And the legislative predilection for criminalization is compounded by the judiciary’s failure to insist that the government offer any justification for putting someone behind bars. In the vast majority of cases, the state doesn’t have to show that criminalization serves any legitimate interest, and the defendant is not even permitted to introduce evidence to the contrary.

Further, the obscene invasion of Sims’ privacy shows just how permissive courts are in letting cops search you almost anywhere, in any manner, and for any reason. Even when police have unlawful motives for stopping you — like racial discrimination — a detention is still legally permissible so long as there’s probable cause for something, including minor traffic violations. Alerts from drug‐​sniffing dogs (i.e.,“probable cause creating” dogs) are nearly always enough for a search, even if such alerts are barely more reliable than a coin flip.

And before admitting you to jail, state officials may conduct an invasive strip search, no matter what you were arrested for (even traffic offenses), and regardless of whether there’s any reason to suspect you have contraband.

So it’s outrageous but ultimately unsurprising that the judicial system’s cavalier disregard for personal privacy, as guaranteed by the U.S. Constitution, has led us to the point that a judge can authorize and police will execute a “search” that effectively amounts to the sexual assault of a teenager. Whatever the supposed harm of Sims’ underlying behavior, there is no doubt that a police officer forcing a teenager to masturbate in front of armed adults under threat of a frightening medical procedure is vastly worse than a teenager consensually sexting his girlfriend.

And the difficulty that Sims has faced in vindicating his constitutional rights shows how police operate with almost no accountability for their actions. Following his ordeal, Sims filed a civil rights lawsuit against Abbott, arguing that his “search” violated his right of privacy under the Fourth Amendment. Incredibly, the district court dismissed Sims’ complaint, finding that the detective was entitled to “qualified immunity” for his actions. In other words, even assuming that ordering a teenager to masturbate in front of the police was unlawful, the law was not “clearly established” enough for Abbott to know for sure that it was unlawful.

In qualified immunity doctrine, “clearly established law” usually requires not just a clear legal rule, but a prior case with functionally similar facts. The perverse result of this standard is that police will get immunity in the most egregious cases, precisely for the reason that the most extreme kind of misconduct is less likely to have occurred in the past.

The Fourth Circuit did reverse this dismissal and permit Sims’ case to proceed, but even that was a close call. The panel decision was 2–1; the argument made in the dissent, had it been accepted by one other judge, would have granted Abbott total immunity, going so far as to say that Abbott’s actions were lawful.

Sims’ case shows that we have a system in which the legislative branch is permitted to criminalize whatever it wants, with effectively no judicial oversight; police investigations are invasive, unchecked, and can cause far greater harm than the underlying criminal act; and it is nearly impossible to hold police liable for unlawful misconduct. Until we address those systemic problems, we should expect more tragic cases like this one.