He pleaded guilty to being unlawfully in a building, and at his sentencing in the Hutt Valley District Court Judge Tim Black granted him permanent name suppression and a discharge without conviction.
Tolmie, a professor at the University of Auckland, explained for a sexual or indecency-related charge to be laid, interaction with another person would be required.
For the defendant, he did not interact with anybody when performing the sex act.
While the Crimes Act 1961 does contain an offence of doing an indecent act with intent to insult or offend, this could not apply to the defendant as it is likely he did not intend for the victim to find out what he had done.
"There's an interactive element with most of the indecency charges," Tolmie said.
She said people had big reactions to people receiving light sentences, but they weren't factoring in how "harmful" a harsh punishment could be.
She believed judges were "very conscious" of the harmful effects of harsh sentences and how they could inadvertently create more victims by "brutalising" people in the justice system.
"Imprisonment, for example. People think it's just a deprivation of liberty.
"They think 'oh my gosh they should have had much worse than that'. I don't know if the average New Zealander realises exactly what prison entails."
In reality, it was an "incredibly violent and dangerous" environment to put people into, which caused "serious harm".
Many complex factors went into making sentencing and suppression decisions, and Tolmie believes people seemed to have a misunderstanding of the criminal justice system.
While she was not familiar with the Wellington man or his case, she guessed there were "complex elements that are beyond just being punitive".
"Victims and members of the public think sentences are just about punishment. It's not just about that, it's about preventing further harm."
During the man's sentencing, defence lawyer Shanna Bolland said her client's mental health was such that publication of his name and receiving a conviction would put him at serious risk of suicide.
Judge Black said his years of working in the family court and working on mental health cases gave him the ability to draw on his knowledge in this case.
He believed from the evidence there was a genuine risk of the man harming himself from the combination of humiliation and shame, and the likely loss of his career.
He also factored in the man's clean criminal history, remorse, guilty plea, and restorative efforts.