For example, Troll Shaman that leads the Troll Raid doesn't have Confusion spell, unlike regualr shaman that is alone, or part of someone else army.
.
Why this happens:
Monster "groups" are defined separately in CoreMonsterGroups.xml file. There, stat of group leader are set, as well as what units accompany them.
The problem is that sometimes the leader doesn't mimic completely normal creature they are from (defined in CoreMonsterUnitTypes.xml). So Troll Shaman that leads the raid does not have Confusion, since the leader version doesn't have it set as their ability, unlike normal version of shaman.
Anyway, to fix this, some pruning is needed to guarantee that all leader versions of units have (at least) same special abilities as their normal counterparts.