What are some common factors that often lead to the replacement of military commanders in times of war?