Yes, it's definitely a bug, as is the ignoring of summoned elementals, because there can be no reasonable explanation for this ignoring in a situation where the computer cannot win without using its army. But I don't see a problem with this. A knowledgeable mapmaker can always make it so that the computer doesn't switch to AFK mode during a siege.
And it's also very easy to trick the computer with summoned elementals into wasting mana, and the only way to prevent the player from doing this is to give the computer a very limited set of spells.