Obligatory spoiler warning, talking about events through season 7.
I was thinking about this when the 3XK arc came to it's end. Beckett killed Kelly Neiman, but Castle didn't kill Jerry Tyson, he only set him up to die, and Esposito killed him with a sniper rifle. I thought it would have been more poetic for both of them to get their kills, but then I thought about it more and it made sense. Beckett is a cop, her job is to be on the line and that sometimes ends with putting people down. Castle isn't a cop, he is a writer, his job isn't to serve and protect, his job is to create the story. Sure, we've seen him capable of killing people, he has that darkness inside of him. When Alexis was missing, he did not care about the consequences of his actions, he only cared about finding his daughter and he essentially tortured an injured man who was involved in her abduction. Later, he attacked Tyson because he knew Tyson was involved in Beckett's kidnapping, he pulled a gun on him and was ready to do whatever it took to get her back. That definitely shows how capable he is of doing what he feels is necessary to protect the people he cares about, but that's not his role. Castle ends up beating Tyson, by creating the story, the plan on how to kill him. He's not the person who pulls the trigger, he's the person that makes all the pieces fit together, in this case, to rid the world of 3XK.
To conclude season 7, we see Castle's demon, the person who led him down the path he ended up going down. In his struggle with Holtzman, he uses Beckett's gun to kill him, in a way, exercising the demon from his childhood. Unlike with 3XK, who was a villain he faced through his work, Holtzman was a personal demon that Castle had to see through himself, and in the end, Castle killed him.
While making this post, Bracken of course came to mind, and unlike the other three characters, he gets arrested instead of killed. As much as Beckett might have wanted to kill him, she understands the difference between justice and revenge. While her actions might not have been the right ones, when dealing with Bracken and her mother's killer, she chose to go for justice in the end.
While Kelly Neiman could have gone either way, how Tyson, Holzman, and Bracken met their ends is important for their connection to the story and the characters.