Killing someone isn't about their morality. It's about that of the perpetrator who chose to commit the act for their own (usually selfish) reasons. The "good" person will be judged on their life. The murderer on theirs.
Most religions also distinguish between killing in self-defense vs. murder.