Part of the confusion is that even fast units dont always retreat, whether in an army or not.
If the opposing unit is one hp from dying, your unit will always fight one more round of combat, even if your unit is also at 1 hp. Also. A unit will never retreat unless it has taken at least one point of damage in the current battle. Thus a combat will always go at least one round before a retreat will occur.
This should be apparent. We've all seen it. Your horseman gets attacked and retreats with 1hp. A second unit then attacks it and destroys it. The only way for a 1hp fast unit to survive a battle is to win it. It will not retreat, no matter how many rounds of combat occur. It must defeat the other unit, or die (and they usually die about then).
Armies are no different. Um... Except for one important detail. Armies are still counted as X number of separate units when they fight (Ok, kinda). It calculates the likelyhood of a retreat based on the damage to an individual unit, not the whole. There's more though, since it will first cycle to a "fresh" unit instead of retreating. I haven't done any extensive testing, but this is how I *think* it works.
Your army gets attacked. The best defensive unit defends. If it's whittled down to red, it'll switch to the next best defensive unitl. If that's down to red, it'll switch to the next unit. If the last unit is reduced to red, then it may retreat. I would expect, however, that if that last unit only had 1 hp to start with (had older battle damage maybe? Also may be *why* it's the last unit in the stack since it started out weak), the army wont retreat, since that particular unit has to lose a point before retreating and that point will "kill" him. Of course, the unit doesn't actually die, but the army as a whole is left with less hp then it has units (which it can do). However, it will then switch back to whatever is the best remaining defensive unit. Since that's considered a separate fight for that unit, I believe it will again not retreat until that unit also loses one point of damage. Since the odds are once you get into this state that all the units in your army only have one point left, your army will not retreat but will instead just die in place.
Again. I don't know if that's exactly what's going on, but that's what it looks like happens.
Um... Good rule of thum is to not ever get your armies into the red. They are very vulnerable to being killed in that state, and the AI will go after them. Usually, the only time I lose an army to warfare is when I got a bit too ambitious with one on attack and left it redlined, and the AI counterattacked and killed it. Hehe. Try to avoid that...