In the beginning Sparta is a polis similar to other Greek poleis. Then something happens to change everything. Over population and the food shortage hit Sparta hard. Harder than just about any other polis. Spartans are dying in large numbers from starvation. Sparta's poor soil cannot support the population of Sparta.
Spartan leaders meet and discuss the future. They can choose to start colonies. Other poleis are doing so. The Spartan leaders decide no to colonies.
Their neighboring polis, Messenia, has some of the finest wheat-growing land in Greece. The Spartans decide the answer to their problem is to seize their neighbor's rich, productive land. And while they are at it, they will turn all of their neighbors into slaves who can continue tilling the land.
A battle plan a drawn up. The war is started. The battle plan is executed. It goes smashingly. The Messenian army is crushed. The Messenian leaders are executed. The Messeniam aristocracy is killed off. The Messenian farmers are turned into slaves the Spartans call helots. The Messenian skilled workers become the perioeci. The perioeci manufacture everything for the Spartans including their weapons. Success?
Not completely. The Spartans realize they have a second problem. There are 20 helots for every male Spartan. It is only a matter of time before the enslaved helots will revolt. When they do revolt, things could go badly for the Spartans. The Spartan government is determined to meet this threat. Again the Spartans consider their options.
It is decided there is only one solution. Sparta must always have the power to crush the helots. To achieve this, the Spartan government decides to turn its entire male population into a permanent army. And that permanent army must be the best trained army in Greece. This means rearranging the way the Spartan government and Spartan society operate.
In the years immediately following their great victory over Messenia, the Spartans do exactly that.. Sparta was once very much like every other Pollis. After its war against Messenia, Sparta is almost the opposite of every other Greek Pollis. It's new society is designed to keep its foot on the neck of its rebellious helots.