You may have heard the phrase “There ain’t no such thing as a free lunch,” perhaps in conversation with your parents when they wanted you to get a job. Its acronym—TANSTAAFL—pops up in subreddits like r/Anarcho_Capitalism, on sweatshirts from the politically inclined website LibertyManiacs.com, and as a nerdy economics rap on YouTube. Also: For the first eight years of the Libertarian Party’s existence, TANSTAAFL was its official slogan. So it may come as a surprise that this oh-so-political meal owes much of its popularity to a single book, about an anti-state revolution ... on the moon.

Written by sci-fi luminary Robert Heinlein, The Moon Is a Harsh Mistress is a libertarian manifesto baked into a novel. Heinlein infused his works with recurring sociopolitical themes, among them "the importance of individual liberty and self-reliance," as a sci-fi writers' society that anointed him its first Grand Master wrote. His interest in personal autonomy and private space exploration later seeped into the writing of other sci-fi authors, and into the minds of their readers—in particular, the leading figures in the commercial "NewSpace" sector of private companies trying to escape Earth's surface.

“The predominantly libertarian people who work in the free space movement almost universally cite Heinlein as their principal inspiration,” wrote engineer Robert G. Kennedy III for Remembering the Space Age, a set of conference proceedings edited by a NASA historian. Some of Heinlein's fans are, in fact, the biggest names in the commercial space industry. Take two of the (three total) people who've won the Heinlein Prize, a $500,000 award for accomplishments in the commercial space business: Jeff Bezos and Elon Musk. Bezos, who has faced speculation about his hypothetical libertarianism and whose gargantuan store certainly ducks taxes and regulation, has said he spent his childhood summers reading Heinlein.

Musk, meanwhile, has called himself both moderate and “somewhat libertarian.” He wants his Mars outpost to have a direct democracy where it’s harder to make laws than delete them—a stance that leans libertarian. Musk too has labeled The Moon Is a Harsh Mistress one of his inspirations.

In the book, the moon has a permanent population living on its death-gray regolith, a settlement of exiles, criminals, and the people they gave birth to. These people revolt against their Earthly overlords in favor of loose self-rule. So yeah, libertarian. The more personal aspects of this political philosophy mesh well with space entrepreneurs: the lone-wolfism, the cowboy-explorer tint, the “you can’t stop me” attitude, and the “go West, young man” of it all.

Heinlein didn't concoct a space-pioneering ethos in a vacuum. Peer back to the nineteenth century, says NASA’s chief economist, Alex MacDonald, and you'll find its earliest utterances. In Edgar Allen Poe’s The Unparalleled Adventure of One Hans Pfaall, a bankrupt bellows-repairman from Rotterdam rides a balloon to the moon, creating a DIY adventure beyond his dreary existence. Poe's contemporary John Leonard Riddell, a botanist and lecturer, invented a fictional scientist who self-engineered trips to the moon and Mars—for science, and maybe for profit. Edward Everett Hale, a pastor and writer, wrote about a group of college friends who built a space station and then accidentally launched a crew of private astronauts, who continue their altered lives in orbit. “[Hale] was interested in the spiritual development of humanity,” says MacDonald. In these early stories, the individuals who want to explore space simply set off and do it.