stat_stl determines the threshold below which a unit disappears after a battle due to having suffered too many casualties. For example, a unit of 64 soldiers might have a stat_stl of 8. Should after a brutal battle the unit have 7 men remaining, the unit will disappear from the campaign map.
The problem is that this behavior doesn't seem to be enforced for the AI, only for the player. I recently mass-replaced all stat_stl to be half of the unit size. This is to eliminate those annoying "zombie" units of 10% capacity in AI armies, which are not fun to fight against. However, this only applied for the player - I lost two cavalry units that barely dipped below 50% capacity after a battle, but the defeated AI managed to hold onto 7 different units at 10% to 30% capacity. Fighting them later will be annoying, but the point is, does this prove that stat_stl is player-only? Or are there certain conditions that must be fulfilled for it to be enforced for the AI? FWIW I also tried ransoming the defeated AI army, but the AI refused. Maybe that bypassed the stat_stl check for the AI survivors?