Not to forestall other answers, but u/Iphikrates gave a fantastic answer to this in Is the Military "Worship" of the Spartans Really Justified?