What have motivated Leonidas to fight to the death for his country?

He might have done it to save his people and so that they could fight back after his death and send the people that he sent home during the war to defeat the Persians after his death.