A vast army of Persians was on the march to conquer Greece.A small force of Greeks had been all that stood in their way.
Unfortunately for Leonidas, after a couple of days, a medizing traitor named Ephialtes led the Persians around the pass running behind the Greek army, thereby squashing the remote chance of Greek victory. Greeks Fight the Immortals: On the third day, Leonidas led his 300 Spartan hoplite elite troops (selected because they had living sons back home), plus their Boeotian allies from Thespiae and Thebes, against Xerxes and his army, including the "10,000 Immortals." The Spartan-led forces fought this unstoppable Persian force to their deaths, blocking the pass long enough to keep Xerxes and his army occupied while the rest of the Greek army escaped.
In addition, Herodotus had access to many ancient sources of information about the battle and the Persian Wars.
Before you read the following passages from Herodotus' Histories describing the Persians and the Greeks, you can follow these links to learn more about Herodotus himself.
Leonidas may have hoped to block them long enough that Xerxes would have to sail away for food and water.
Ephialtes and Anopaia: Spartan historian Kennell says no one expected the battle to be as short as it was.