Maybe sword skill is a factor? Perhaps the rate at which your unit dies as well (5 rounds of 20% losses VS one round of total wipe-out), and your unit behavior. Of course, if all units are of similar strength with the same deployment orders, it comes down to luck I suppose