I think it was preparation in case Xykon happened to arrive, remember that all antagonists arrive at the speed of Plot, and with Elan on his team, he would be well-versed in such bardic conventions. But on a serious note, he prepared most of his combat spells to be Undead-Facing Powers, Death Ward and the aid friends/destroy undead Heal Spell etc. Or spells to clear out hordes of lesser hobgoblins, like Thor's Might. It just happened to also be effective against Malack, as Malack was also undead. Remember that he didn't know Malack was an undead enemy, so most of the spells were not meant to be used on anyone but Xykon. Also, he's a cleric, turn undead is a class feature, not a spell, he has it "prepared" everyday.