The map stores data about a neutral unit as a monster type, their quantity, and various bonuses like fleeing or joining. When attacking a monster in the game, the game applies one clever rule: under certain conditions, neutrals split into several units (you can find out about the exact dependency in the physics engine at
http://homm3world.narod.ru/), and under certain conditions, if they split into more than 1 unit, they can be combined with an upgraded unit (this dependency is described on the forum here
/topic/at/338107/). The total number remains the same.
After conducting a battle and not defeating the monsters (they fled, died to the hero), information about the casualties should be written back to the map's data, but you can only record 1 type of monster – namely, non-upgraded ones. And the game "loses" or doesn't record the upgraded ones because they have a different type.
Hence, we have this trick: attack, then flee. The total quantity will decrease by the number of upgraded units that were present during the attack. Analogy: attack, kill all the non-upgraded units, flee, and voila – there are no monsters left at all.
And if we know that we cannot defeat some guard force with our entire army, we can buy 5-6 suicide heroes, attack several times, and the number of troops in that guard force will significantly decrease, and then we can finish them off with a regular army.
This is only relevant for monsters on the map; it does not apply to banks or Pandor/events.
And I warn you that using this is illegal in most cases in tournaments and even ordinary games on most Heroes resources.