This sometimes happens when a monster is trying to fight another monster around a dungeon heart. It has something to do with the differences in elevation. If you slapped the imp the horny was targeting and jostled him a bit, he would've gone on to kill them all.