The following contains spoilers for CSI: Vegas Season 2, Episode 2, "The Painted Man," which debuted Thursday, Oct. 6 on CBS.

CSI: Vegas' Halloween episode "The Painted Man" did its job of delivering a disturbing mystery -- but it also made a statement about the justice system. The hour was a showcase for Allie Rajan, played wonderfully by Mandeep Dhillon as she became increasingly unsettled by the behavior of murder suspect Gene Farrow (portrayed by J.P. Manoux). Convinced that Gene killed the victim and he was coming for her next, Allie had him arrested on lesser charges to get him behind bars.

However, the evidence proved Gene's innocence and set up a final confrontation between the two. After the real murderer was arrested Gene arrived at the crime lab and angrily told Allie that his charges had led to him getting fired from his job as a building superintendent, which meant he was also evicted from his home. CSI: Vegas illustrated the high stakes of criminal justice while also not demonizing the system, and that was more impressive than any of its scares.

RELATED: Why Criminal Minds Ended With Season 15

CSI: Vegas' Murder Suspect Had a Valid Point

CSI Vegas Allie

"There's something you need to understand, doing what you do," Gene insisted to Allie, complete with pointing finger. "People who may act a little different or look a little different, it doesn't make them a bad person." He wasn't wrong to be upset with Allie, nor was he wrong in his statements. Allie did convince herself that Gene was the killer, and her decision to have him arrested had massively negative consequences in his life. In fact, there may continue to be consequences if the arrest hinders his ability to get a new job or a new place to live. That's a huge responsibility on the shoulders of every law enforcement officer, and not one often explored in crime dramas. While the good guys can be wrong, they usually just move on to the right suspect.

CSI: Vegas took a brief beat to acknowledge that cause and effect. "The Painted Man" was smart in its phrasing; Gene told Allie that "those stolen tools" got him in trouble instead of using "you." Those words signified acceptance that his committing the theft in the first place was wrong. He wasn't scapegoating Allie for everything. What he was doing was taking issue with her having him arrested, because having the arrest on his record created a whole separate set of issues. Allie jumped the gun on having Gene arrested because of her reaction to Gene, and as Maxine Roby said, "That's not good, but it's not evidence."

RELATED: NCIS Season 20 Will Be Rough for Agent Torres - Will He Survive?

Allie Also Had Valid Reasons for Suspecting Him

CSI Vegas Allie Photo 2

Just as important as what Gene had to say is that CSI: Vegas didn't discount how Allie felt. From his first scene, his behavior wasn't just quirky -- it was disturbing. Criminal Minds' Zach Gilford could learn something from Manoux's performance. Gene was directly aggressive toward Allie in their first interview when she didn't want to call him by his first name. Not only did she find a doll of herself in his home, but she found it in a room that displayed all the hallmarks of obsession. And at that time, she had decent cause to believe he was the killer. The context gave her every reason to be scared of him. Max even called that out when she warned Allie about making Gene angry, foreshadowing the later scene.

Allie also wasn't legally wrong in having Gene arrested, since he did admit to the crimes of trespassing and burglary. Her problem was that she didn't have to go that far. She reacted from a place of emotion (not unlike Catherine Willows), yet that fear and concern for safety -- hers and that of the general public -- was reasonable. Too often in procedurals and even sometimes in the real world, situations like that are simplified down to "someone made a mistake and they should be punished for it." Allie made a mistake and was as remorseful for it as she was afraid earlier in the episode. But she wasn't framed as a bad CSI or a bad person. In fact, the following moment with Gene ominously getting into the elevator hinted that she might be right about him in the future.

However, that moment was completely unnecessary. While it was probably done to end the Halloween episode on a moment of suspense, it undercut Gene's message. CSI: Vegas provided food for thought in Gene's interactions with Allie, and that's the kind of deeper nuance that many procedurals don't have. It's another reason why this series is making the CSI name proud.

CSI: Vegas airs Thursdays at 10:00 p.m. on CBS and streams on Paramount+.