If Alice is associated with Bob the Villain, her chances of dying increase in direct proportion to the evilness of Bob's actions and/or the closeness of their association. If he's VERY evil and they're VERY close, then she's VERY dead. But if he's very evil and she's not that close to him, or if they're very close but he's never done worse than Poke the Poodle, she'll be fine.
The driving force behind this trope is that it provides karma by proxy for a villain who might otherwise be untouchable. If Bob is the main character, his Plot Armor protects him, but he still deserves his comeuppance for his deeds. Thus the penalty falls on Alice, costing him someone he cares about. If Bob is an established villain and we are seeing his Start of Darkness, we already know that he'll survive — but if his loyal bodyguard is killed by an enraged mother with a crossbow, it provides the sense of justice, albeit thwarted, that the viewers crave.
Conversely, heroes tend to cast a protective force on their friends and loved ones. This is because The Hero will ALWAYS save his or her friends in the Sadistic Choice of the Friend or Idol Decision, or in the choice between power and love, or in the choice between his loved ones and just about anything.
However, the equation goes both ways. Sometimes, even the most kind and loving All-Loving Hero can get downright scary when those close to them are in danger. Once you've kicked the hero's loved ones off a cliff, you can expect the hero to do things that he wouldn't even consider otherwise if it means making you pay for what you've done.
- In Code Geass, once Lelouch starts loosening his morals, the people he cares about die (like Shirley), bad things (like genocide) start happening, and he loses his best friend (Suzaku).
- The Dark Knight Rises sees nearly everyone who sides with Bane dead by the end of the film, while the only casualty on Batman's side is the cop who refused to stand against Bane earlier in the film.
- Applies to those around Jimmy in GoodFellas. After the Lufthansa heist, everyone related to said heist to begins to turn up dead. Then, even more people start dying, including his best friend.
- Star Wars
- Reverse case: in Attack of the Clones, Anakin, after having his mother die in his arms, takes out his anger and frustration on the vicious sand people who killed her. He even kills the women and children of the sand people village. This is a sign that Anakin is getting darker in how he does things, though, and paves the way for his fall as a Jedi and rise as a Sith Lord.
- In Revenge of the Sith, Anakin has just killed several children and a Jedi Master. His wife, Padme, refuses to follow him on his path to The Dark Side. He uses The Force to choke her, causing her death. However, due to the force of Plot, she lives long enough to die later from childbirth. This is one case where Karma ricochets back on the evildoer, as Anakin is burned by lava, becoming Darth Vader, which was ordained by the Plot to happen.
- Magneto struggles with this throughout the X-Men Film Series:
- X-Men: First Class opens with Erik Lehnsherr losing his parents in the Holocaust while Charles Xavier gains a foster sister in his comfy estate.
- By X-Men: Days of Future Past, Magneto has lost four members of his Brotherhood to Dr. Bolivar Trask's medical experiments and ends up stuck in jail, while Xavier has lost only one student to Trask and still maintains his mansion.
- Played for Drama in X-Men: Apocalypse, where after Erik's wife and daughter are killed while Professor X teaches at his prosperous school, Lehnsherr screams towards the heavens in agony, asking God why He always seems to take the people he's closest to. The X-Men suffers one casualty.
- Hamilton centers around a pair of two orphans, Alexander Hamilton and Aaron Burr, who start up families around the American Revolution. Burr seeks political power for the sake of it and so his wife is dead halfway through the show while Hamilton's wife is just fine. Meanwhile, thanks to his actions in "Say No To This" and "Hurricane," Hamilton's son is shot and dies in his parents arms.
- Harry Potter and the Cursed Child's two protagonists, Albus and Scorpius, have loving families that support them the whole, but the difference is Albus's father was a good guy while Scorpius's father worked for Voldemort, so while Albus has many siblings and a healthy mother, Scorpius is an only child and his mother dies by Scene Three. The Big Bad also contrasts with them both, being an orphan with no relatives or friends to be comforted by.
- In 8-Bit Theater, Black Mage is very powerful, but not very successful, and fails miserably at trying to kill the other light warriors. When he finally does achieve ultimate power and kills the other light warriors, he accidentally kills White Mage, the only thing in the universe he cares about. When the other light warriors and White Mage are resurrected, Black Mage soon loses his ultimate power.
- In The Order of the Stick: Start of Darkness, Redcloak can't die because it's a prequel, so his brother ends up paying for their evilness instead.