>>310769
- Your ally becomes a vampire or has a confusion / rage / mind control spell effect, and is attacking you. They need to be put down like a dog.
- Reflecting mirror positive spells or effects, as other anons said.
- For meta-game purposes if they will turn on you permanently in an upcoming fight or scene as a plot point or due to reputation loss.
- Sometimes black and blood magic puzzles require the blood of an innocent or friend (looking at you Planescape: Torment and Baldur's Gate), and that innocent elf woman in your party is a fitting Moloch sacrifice to Ba'al after she's standing conveniently on the altar.
- Undead often heal from damage spells, so if you have an undead party member, 'attacking' them with harmful anti-life spells is actually healing them.
- Sometimes game engines bug out, especially old ones, and they're blocking a doorway or are trapped. Killing them lets you recover them later without breaking the game or cheating to fix it.
- Sometimes game have resistances and immunities with percentages, and if you're above 100%, you actually heal from that damage type, so whacking your friend with your firesword heals them. It's also useful for testing the defense of items and armor and spell combos before fighting real enemies.