Suppose you're a woman who was raped while still in your teens—your life basically shattered. For the last 10 years you have barely been able to look any man squarely in the eye given what was done to you by just one horrible man. You have just recently overcome your overarching fear of intimacy, and now, finally, the rapist has been caught, and has pleaded guilty to what he did to you and others.

You have reached that moment for personal closure, assuming that is even possible, and maybe even revenge. But you can finally stand up to your full height in a public courtroom, stare him in the eye and tell the world exactly what he did to you and the impact it has had. And people will listen—you will be heard. You practice in the mirror 10 times a day for a week, and finally you're in the courtroom no longer afraid to stare the man in the eye. And you are closer to being free. This “release,” as it were, is precisely what any therapist would have ordered, and society has agreed with the wisdom and propriety of victims confronting their perpetrator. That is why the courts allow victims to appear in court at sentencing, to point their fingers at defendants in such cases, and speak truth to those who previously had all the power against them.

And, of course, it should be exactly that way—probably every victim needs to be heard, to face their abuser, as a critical element of the personal healing process. Society, the public—we need to hear you as well. To understand and appreciate the impact that that person had on your life and the lives of others. With appropriate decorum exhibited in the pristine atmosphere of a courtroom, victim impact statements should indeed be a foundation of the sentencing process.

But let's look at that final day of sentencing in the case of Larry Nassar. The man deserves no forgiveness, no pity. Nothing could serve to mitigate what he had done for decades. Yet, did Judge Rosemarie Aquilina of Lansing, Mich., who has been heralded in many quarters for her conduct when sentencing Nassar and been given a screenshot on the front page of The New York Times, go too far? Not by allowing more than 150 of Nassar's victims to address him and tell him in the starkest terms what he had done; his victims should tell him, the court and all the world what he had done.

But when it came time to impose sentence, Judge Aquilina's final words to Nassar were angry and vehement. She did not render her sentence dispassionately. Instead she told Nassar that she had the “privilege” to sentence him; that his actions were “devious” and “despicable.” She told him that, if the Constitution allowed, she might allow others to do to him what he did to his victims. And finally, to applause in the courtroom, as she essentially solicited: “I just signed your death warrant.”

Does society need retribution in the form of a judge pointing her finger at the defendant using the same kind of invective that one might see—and, indeed, expect—from an individual victim? Is society better off—indeed, are the victims better off—if the judge herself or himself lashes out at a defendant for his crimes, however horrible, as if he or she was the victim who had personally suffered at the hands of the defendant? Should we want judges to basically descend from the bench and the majesty of the position they hold, stand in the well of the court and become finger pointers—trash talkers, as it were—as if they themselves were now empowered victims? Just how much should a judge relate to those harmed?

While there is often indeed value in a judge giving a strong tongue lashing to a reprehensible defendant who has so victimized others, particularly those who are so vulnerable, the judge's role is to hear from both sides, make a determination of the appropriate sentence and, yes, in some cases, stick it to the defendant. But Judge Aquilina did something far different—she went “medieval” on Nassar, behaving like a robed Elmer Gantry and, in doing so, compromised the dignity of her courtroom.

I expect she meant well, and had truly empathized with the victims who spoke so bravely (and sufficiently for its true purpose) in her courtroom. And maybe the judge thought saying those harsh words might deter others. Nonetheless, the criminal justice system is composed of different players who have different roles. The judge is not the prosecutor, and she certainly isn't the victim.

To be sure, Nassar, is not a victim here in any way. However, especially with cameras in the courtroom—and maybe that's a reason to deny them, given that the judge may have been playing to the world outside her courtroom—imposing a 40- to 175-year sentence (to run after his previously imposed 60-year sentence) might have truly done the deterrence trick without the hang-him-high “death warrant” language.

Nassar must be punished for horrific acts. And deterrence—a message to others—is a key component of sentencing. But Judge Aquilina's words have turned the story to her and whether she went too far? That is not what the girls' stories are about; and that is not what making sure Nassar never sees the light of day is about. We often need bold action from judges, yes, but never performance.

Joel Cohen, a former prosecutor, is of counsel at Stroock & Stroock & Lavan. He is an adjunct professor at Fordham Law School and is the author of “Blindfolds Off: Judges on How They Decide.”