According to Merriam-Webster, in the English language, "Spartan" has taken on the following meaning:
Spartan (noun): Definition of Spartan (Entry 1 of 2)
1 : a native or inhabitant of ancient Sparta
2 : a person of great courage and self-discipline
Spartan (adjective): Definition of Spartan (Entry 2 of 2)
1 : of or relating to Sparta in ancient Greece
2a (often not capitalized): marked by strict self-discipline or self-denial "a Spartan athlete"
2b (often not capitalized): marked by simplicity, frugality, or avoidance of luxury and comfort "a Spartan room"
2c : laconic
2d : undaunted by pain or danger
Likewise, when I was in Year 7 (i.e. 1st year of high school in Australia), our history curriculum covered Ancient Greece. It portrayed Sparta as a place which produced the best soldiers by being extraordinarily harsh on its citizens (e.g. grueling training in the agoge, state-mandated infanticide, annual crypteia where they kill slaves). It goes without saying that in Western books and movies, Sparta is portrayed in a similar way.
But after watching these 2 videos, it debunks the notion of the "Spartan super-soldiers":
This raises the question of Why does the West even glorify Sparta in the first place? After all:
The glorification of Sparta dates back to Antiquity itself, and has always existed in a couple of flavours. It has been questioned and debated since the start (ancient Greek authors like Aristotle and even Xenophon could be highly critical of Spartan society and behaviour), but there has been enough praise and admiration over the millennia to lodge vaguely positive associations with Sparta in our language and culture.
Spartan education
Perhaps the oldest and most enduring form of glorification of Sparta is the glorification of its collective and comprehensive education system for citizen boys. When the ancient Greeks tried to explain Sparta's success, they looked mainly to the Spartan habit of raising boys in groups from the age of 7 and inculcating them with the most prized civic values (obedience, deference, selflessness, endurance, and so on). The apparent subjection of the individual to the state, and of personal differences to a collective equality, was appealing to many Greek thinkers who wanted their communities to be more cohesive and safe. Through the centuries, it has also been appealing to groups that believe the foundation of a healthy society is a uniform moral education in which things we agree are good (justice, honesty, respect for authority) are drilled into everyone before they reach an age to enter civic life. To some extent, all modern systems of state education are derived from the Spartan example, though the link is often very indirect and the intended outcome is certainly not always the same.
Another major element of the Spartan education that has provoked admiration since Antiquity is its physical component: the focus of the Spartans on athletic training, in public and in competition with peers, for both boys and girls. Most pedagogic theory from ancient to modern times will contain some level of stress on the importance of training the body as well as the mind, and in this sense Sparta provides the perfect example. Especially in the later 19th and early 20th century, when much ink was spilled over the way to improve the health and demeanor of the national youth in many European countries, the Spartan practice was often cited.
Spartan government
You suggest that modern western governments have modelled themselves more after Athens than Sparta, but this is not true. For most of history (right up to the 19th century), European political thinkers considered Athens a terrible warning of the excesses of popular rule. French Enlightenment thinkers and American Founding Fathers abhorred democracy and designed their ideal constitutions to be nothing like it. Their great examples of more balanced "republican" consitutions, in which power was shared between "aristocratic" as well as democratic elements, were Sparta and Rome.
In this tradition of glorifying Sparta, its greatest achievement was political stability. The Ancient Greeks already noted that Sparta was remarkably free of internal struggles, civil war, and tyrannical rule, whereas other Greek states saw much more regular socio-political upheaval. They credited this stability and internal peace on the wisdom of the mythical lawgiver Lykourgos, who had devised a system that prevented excesses of greed, inequality, ambition, demagoguery and the like. The Spartan constitution spread power among the kings, magistrates, council of elders, and assembly. Spartan laws put severe constraints on conspicuous consumption, competition for wealth, and opportunities to seek glory in anything but service to the community. Even if these laws were eventually abandoned (or never really existed in the first place), they clearly provided a better model than the violent and fickle Athenian democracy.
Spartan eugenics and "purity"
Classical Greek authors suggested the benefits of Spartan eugenic practices, and Plutarch claimed (probably falsely) that the Spartans weeded out those who seemed physically unfit for citizenship at birth. In the late 19th century, with the rise of Social Darwinism as a scientific and political movement, this idea came to be seen as a possible inspiration. It might trouble us that people would think of structural Spartan infanticide as a good thing, but plenty of European thinkers saw this as a model their nation ought to adopt in order to improve and "purify" the stock (partly in conjuction with the higher emphasis on physical education mentioned above). Scientific racism was also widely embraced at the time, and there was a strong element of racism in this aspect of the glorification of Sparta. Throughout the first half of the 20th century, many people praised Sparta because it was supposedly an early example of a state that upheld the "purity" and high quality of its bloodlines.
Needless to say, this form of admiration for Spartan practices found its strongest proponents in the Nazis. Hitler and the ideologues of his movement built on earlier German scholarship to argue that the Spartans were not Greek at all, but a blonde-haired Nordic Herrenvolk that had obtained its power in Greece by conquest and maintained it by jealously guarding its racial purity. This theory traced both the ancient stereotype of the beauty of Spartan women and the supposedly superior character of Spartan men to their ban on marriage outside the citizen body and their systemic infanticide. The Nazis were obsessed with Sparta, both as a forerunner of their own racial politics and as a guide for their attempt to conquer vast swathes of land to be worked by an enslaved underclass. They constantly invoked Sparta and Thermopylai in their propaganda and speeches, taught Spartan values in their elite boarding schools, and demanded Spartan levels of endurance and self-sacrifice of their soldiers. The Nazis did more than anyone to establish the notion of the "heroic Spartan defender" in the modern western consciousness.
Spartan militarism
While some ancient authors clearly admired Spartan military practices, they were quickly rendered obsolete by truly professional armies like those of Macedon and Rome. Later tradition was never very interested in the practical details of how exactly the admirable Spartan constitution and character were connected to their military record. Yet modern audiences probably think of this part first (and perhaps to the exclusion of all others). This is because admiration for Sparta as a military culture is a unique aspect of our own contemporary culture. Its main impetus dates, in fact, to 1999, when Frank Miller's graphic novel 300 and Steven Pressfield's historical novel Gates of Fire were published. These works (and the movie that followed the first one) were unprecedented in their specific glorification of Spartans as warriors, rather than as shrewd social engineers or selfless instruments of their state. They are the first to harp on the Spartans as uniquely strong, skilled, disciplined, and fearsome in battle. They depict Spartans doing pushups and following the commands of their drill sergeants like recruits in an Ancient Greek USMC boot camp.
In her essay on the subject (2012), Lynn Fotheringham noted that this hypermasculine, ultra-militaristic picture of Sparta predates 9/11 and therefore cannot easily be linked with the surge of nationalism and militarism that followed the attacks. Even though it is steeped in Orientalist oppositions of western rationalism and freedom against eastern despotism, it doesn't seem to be a simple reflection of the rhetoric of the wars in Afghanistan and Iraq. She argues that its roots lie instead in the genres in which these stories were written: the ultraviolent male hero of American comics and the extreme military focus of much historical fiction. When Miller and Pressfield set out to write about Thermopylai, they adapted the historical Spartans to fit the mould.
You'll note that the dictionary defintions of words like "Spartan" may refer to general civic virtues like austerity, steadfastness, or courage, but not to specific military traits like strength or skill. The modern obsession with Sparta as a military society hasn't left its mark on the language yet. It is a very young picture of Sparta, and already deeply politically suspect due to its appropriation by the far right; it may not last very long. For my part, I hope that the scholarly pushback against the distorted an unhistorical image of Sparta as a society of modern soldiers will help to bring our understanding of this ancient community back down to Earth.
This answer by u/Iphikrates does quite a bit in answering your question and focuses on how Spartans really mastered the art of the spin.
This set of answers also by /u/Iphikrates gives even more detail on just how great the Spartans were at building their image and story.