For reasons that are unclear, the Athenian society, which was crippled and demoralized by the defeat in the Peloponnesian War, gave rise to several brilliant minds, including philosophers like Socrates, Plato, and Aristotle.
The militarily powerful Sparta did not produce a single major thinker, but it played a critical role in keeping Athens safe from invaders—this, I think, was the key contribution that the Spartans have made to the cause of philosophy, literature, and art. In 480 BC, the Persian King Xerxes would have wiped out Athens and rest of Ancient Greece if the Spartan King Leonidas had not stopped the Persian army comprising of more than 200,000 soldiers at the narrow passageway of Thermopylae.
Without nationalistic and militaristic Sparta, there would not have been any democratic and liberal Athens—and without Athens, it is possible that Socrates, Plato, and Aristotle, and several other artists and writers might not have found a conducive social environment for doing their work. By protecting Athens from the Persians, Sparta granted the brilliant minds of Athens the opportunity for completing their work.
The learning that we can draw from the history of Classical Athens and Sparta is that a democratic and liberal environment is necessary for the flourishing of literature, art, and philosophy, but such an environment cannot survive without the support of a nationalistic force.