Taking nothing away from Leonidas & the 300, but Sparta itself was engaging in a lot of half-measures & foot dragging. Persia considered Greece to be an unruly vassal that had to be disciplined. Look at a map. Sparta is way down south & there are narrow isthmuses that could be defended. So the question must have been, "What are the intentions of the Great King?" Will he stop at Athens or will he continue South?
My guess is that the Spartans wanted to play both sides against the middle. Essentially they sent a sacrificial force north to buy time for the Greeks. A force small enough as to not offend the Great King overmuch, but large enough to give a bloody nose & demonstrate 'resolve'. As it eventually turned out, the Greeks were collectively victorious, but what if they hadn't been?
I think the Spartans would have sought a deal with the Persians, and if that was not successful then by their previous limited actions they would have preserved the bulk of their forces for further resistance.
My 2 Cents.