Because Doom's code has no sides. In the code id Software released in 1997 (version 1.10), when anything hurts a monster and it lives, whoever did the damage becomes its new target. The note on that line says "chase after this one". Nothing checks whether it was you.
Monsters aim past walls, never past each other, so a stray fireball lands in whoever is in the way. Then the grudge: the code sets a count of 100 that drops by one with every step of the chase, and until it runs out or the target dies, no other hit can turn it. That's why the soldier ignores your shots while he's busy with the imp.
One check comes first: a fireball that hits the shooter's own kind will "Explode, but do no damage" ("Don't hit same species as originator."). So two imps never start a fight. Bullets have no such check, so soldiers can still shoot each other. And in Doom II one monster is never chased back: the arch-vile.
Sandy Petersen, one of Doom's level designers, says the fights began as an accident, and everyone at id loved it.
The hall, the figures and the fights are our own simplified version, drawn in code; what follows each hit is the rule from id's released code, run on our scenes. Our fireballs fly a little slower than the game's.
Which two would you set on each other?
Sources: Doom (id Software, 1993). id Software's released source code, linuxdoom-1.10 (December 1997): P_DamageMobj, A_Chase, PIT_CheckThing, BASETHRESHOLD. Sandy Petersen, interview by UnknDoomer (Doomworld, September 2024).
Not affiliated with or endorsed by id Software, ZeniMax or Bethesda.
Sounds and music: our own, made in code.
