@Pol
I did some more testing on my own and discovered the following:
-the CPU doesn't always necessarily play its turn the same way, it changes the pattern and revaluates threats and primary targets and thus it won't attack the player every time when (re)loading the save game file
-the upper row in all castles is reserved for the garrison Hero and the lower row is for the visiting Hero. In my example the Blue CPU ally of mine had no garrison Hero because it didn't consider his castle likely to be attacked by enemy forces as long as my army was there. The fact that the enemy arrived via Dimension Door may have messed up his battle plan.
-the CPU ally places the two garrison stacks with my troops every time the attack takes place. I had two slots available and Blue had no Hero in town and that is why I reason the CPU acted that way. This is similar to the fact that when you are defending your own town against AI enemy player, the AI counts only the army that your Hero has with him and not those that are inside the town, placed in the upper that is the "garrison row". Of course when the enemy attacks you, the two armies are combined. Another favourite tactic of mine.
I zipped the autosave and two screenshots together and now they are on the Web, available for all members at ByteBanditmaps6. The folder is called Suspected bugs in Heroes III.
Merry testing!
With solidarity,
Yurian
Don't worry if things are going badly today. They will be much worse tomorrow.