Danny Cevallos is a CNN legal analyst, criminal defense attorney and partner at Cevallos & Wong , practicing in Pennsylvania and the U.S. Virgin Islands. Follow him on Twitter: @CevallosLaw . The opinions expressed in this commentary are solely those of the author.

(CNN) Recently, Nashville's district attorney banned prosecutors from offering female sterilization in plea deals . Believe it or not, Nashville prosecutors have offered this option four times in the past five years.

There has been public outrage at the notion that a defendant in America in 2015 would be offered a choice of sterilization as part of a plea deal.

Except, it happens all the time.

Some have claimed this practice "evokes a dark corner of American history" where the mentally ill or "deficient" were forced to undergo sterilization.

Yeah, that's true. We did that. And it was bad. Except this isn't quite that.

Danny Cevallos

Female sterilization is linked to the controversial "eugenics" movement, which advocated for the notion that the human race can be improved by selective breeding of people with superior genes.

There is even a 1927 Supreme Court case, Buck v. Bell , in which the justices ruled that a state statute permitting compulsory sterilization of the unfit and "imbeciles," "for the protection and health of the state," was constitutional. The opinion in the case is stunning, especially because the Supreme Court has never technically overruled it. But Buck v. Bell dealt with involuntary sterilization of people because of their mental disabilities, not because they were being punished for a crime.

You can hate sterilization, and the Tennessee case may have the creepy feel of the antiquated practice of eugenics, but it's not that. Present-day sterilization plea deals involve a voluntary choice of sterilization by persons accused of a crime, and for whom sterilization will be part of their punishment.

Others may argue that the Supreme Court has already spoken on the issue of compulsory sterilization as punishment, and struck it down. That's true too, sort of.

In Skinner v. Oklahoma , the Court struck down a law permitting compulsory sterilization of criminals as unconstitutional, but not because it was cruel and unusual. Instead, the law was struck down because the law was unequally applied for similar crimes.

So the question remains: Is sterilization as a punishment unconstitutional?

The Eighth Amendment provides: "Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted."

Practically, however, punishments are rarely deemed cruel and unusual by the judiciary. We have executed people with hangings and by firing squad . Sterilization has to be somewhere below that, right? Ultimately, however, the constitutionality of sterilization may be a red herring in this analysis, because it appears that even if a punishment vciolates the Constitution, it is permissible, if you willingly choose it.

Suppose arguendo (for argument's sake) that sterilization is judicially labeled a cruel and unusual punishment, violating the Eighth Amendment. This is where it gets interesting: It still might be an appropriate and constitutional part of a plea deal. Shocked? You shouldn't be.

As citizens, we validly waive our constitutional rights all the time. You waive your Fourth Amendment protections against search and seizure when you answer "yes" to an officer's "Mind if I look in your trunk?" You waive your Fifth Amendment privilege against self-incrimination when you try to explain to the detective in the interrogation room how that body got in your vehicle's trunk. So then, if we can validly waive our other constitutional rights, can we waive our Eighth Amendment rights and choose a cruel and unusual punishment, even if it would otherwise be unconstitutional? And are people outraged because this is a new step in punishment or a new frontier and a slippery slope in the world of plea deals?

Nope.

If sterilization plea deals are likely constitutional, and we've been doing it for a while, then that begs the question: Why the outrage now? Why the story that a Tennessee prosecutor was fired for a plea bargain that appears to be widely practiced?

There are really only two possibilities. First, some people just had no idea that this was going on until this story hit the news. Second, even if we knew about it, we didn't mind the practice until now because of one fundamental difference.

Most of the sterilization defendants are men.

Search your feelings, Luke . When we talk about castrating men who are recidivist sexual predators and child molesters, the idea of castration as punishment doesn't sound so bad right? Be honest: Let go of your "we're-all-equal-in-all-ways" banner for a moment. After all, not too long ago, execution was a legal punishment for nonhomicide sex crimes in some jurisdictions. So if we're OK with the gas chamber, we're probably OK with a snip. It's OK. You can admit it; we are all hardwired with a modicum of gender bias, whether we like it or not.

Still not convinced? Watch this parlor trick: What if I suggested sterilization for a person convicted of having sex with a minor? So far you're not ruling it out.

And what if it's a young female high school teacher having sex with her 17-year-old student ? Most of our gut feelings shifted from "maybe" to "no" just now. It's OK to admit that, too. Of course, sterilization won't prevent a female sex offender from offending again, no more than sterilization will prevent a male offender from offending again. But the point is, somehow, the notion of sterilizing a male criminal somehow sits better with us than sterilizing a female criminal.

Maybe it's that on a primal, unconscious level, what feels cruel and unusual punishment for a woman just feels less so for a man. Even if you're offended by this theory of why an old practice is now a "shocking" news story, you must concede it fits. Why else has castration of men not been a blip on the radar, but offering a woman the option of sterilization is suddenly a travesty? Of course, we have to consider the related justification. Overall, a lot more men commit acts that merit sterilization than do women. Just ask any domestic violence prosecutor.

Are sterilization plea deals morally right? It's hard to say. For now, they appear to be constitutional, but controversial. If we know a mother is likely to kill or seriously hurt her current children or her unborn child, should the government step in? If so, to what degree? Fortunately, we can avoid a final decision and continue to attack the problem in a way that seems to be more acceptable for now: just keep neutering the men.