In the early part of the 6th century Sparta was defeated by its neighbours. The people decided that this was because they were too weak and not fit enough to defend themselves.
So, from that time, the idea of extreme fitness and a city of soldiers developed.
Sparta was not near the sea. So it developed an army, rather than a navy, like the Athenians.