The problem with that is it leads to extremely crushing defeats. Read up on the casualty numbers at the battle of Marathon, for example.
On the other hand, I think most marshals would like a checkbox that says "if infantry are defeated, archers perform an orderly retreat".