It could also be that the situation was extremely dire. For example, the troll was about to destroy something very important, like a magical artifact that could cause great harm if it fell into the wrong hands, and Hermione saw killing the troll as the only way to prevent that.
One reason could be that the troll is simply on a rampage and Hermione was in the wrong place at the wrong time. Trolls are not known for their intelligence, and it might have just stumbled upon Hermione while wandering the Hogwarts halls.
In some fanfictions, it could be related to a power struggle within the wizarding world. If Hermione was seen as a threat to Ginny's family or her own standing in the magical community, Ginny could be pushed to the edge. Also, if there was a rift in their friendship over ideological differences, like Hermione's more logical and rule - based approach clashing with Ginny's more impulsive and instinctive nature in a very extreme way, it might lead to such a tragic outcome.
In some fanfictions, it might be due to a broken relationship. For example, if something goes terribly wrong between her and Ron or Harry, she could sink into a deep depression and see no way out. She may feel that she has lost the most important people in her life and can't bear the emotional pain.
One reason could be pure hatred. Bellatrix despises Muggle - borns, and Hermione being a very intelligent and powerful Muggle - born would be a prime target for her wrath. Another could be jealousy. Hermione's skills and knowledge might make Bellatrix feel inferior, leading her to lash out.
One possible reason could be heartbreak. If Harry was deeply in love with Hermione and she chose someone else, like Ron, the pain of rejection could be too much for him to handle. Another reason might be if Hermione betrayed Harry in some way, like revealing his secrets to the enemy. This sense of betrayal could shatter his trust and push him to the edge.
She could face legal issues in the wizarding world. Killing is not taken lightly, even if it's Death Eaters she's killing. There might be a trial to determine if her actions were justified. If the wizarding authorities are corrupt or influenced by the wrong people, she could even be wrongly convicted.
It could also be due to a misunderstanding. In the heat of the moment during the vote, there might have been miscommunications or false assumptions. Naruto might have thought Sasuke was going to betray them all and in his haste to prevent that, made the tragic decision to kill him.
Power imbalance could also be a reason. If Naruto's power suddenly goes out of control or he misjudges the Teen Titans' power levels and thinks they are a danger to his world or friends, he might take extreme actions. For example, if there's some kind of power - up in Naruto that makes him overly confident or paranoid, he could lash out at the Teen Titans thinking he's protecting something important.
One possible reason could be that the council has been secretly plotting against Naruto all along, perhaps trying to undermine his power or even get him exiled. Naruto might have discovered their malicious plans and decided to take pre - emptive action to protect himself and his friends.
Well, in some fanfictions like this, it might be due to a dark magic curse that controls Harry's mind and makes him do it. However, this is a very dark and non - canon concept.