There ain’t no such thing as a free lunch” (alternatively, “There’s no such thing as a free lunch” or other variants) is a popular adage communicating the idea that it is impossible to get something for nothing. The phrase is central to Robert Heinlein’s 1966 libertarian science fiction novel The Moon is a Harsh Mistress, which popularized it.  The free-market economist Milton Friedman also popularized the phrase by using it as the title of a 1975 book, and it often appears in economics textbooks; Campbell McConnell writes that the idea is “at the core of economics”. 5] The acronyms TANSTAAFL (which appears in Heinlein’s novel) and TINSTAAFL are also used. Uses of the phrase and the acronym dating back to the 1930s and 1940s have been found, but the phrase’s first appearance is unknown.  The “free lunch” in the saying refers to the nineteenth century practice in American bars of offering a “free lunch” with drinksThe “free lunch” referred to in the acronym relates back to the once-common tradition of saloons in the United States providing a “free” lunch to patrons who had purchased at least one drink.
Rudyard Kipling, writing in 1891, noted how he came upon a barroom full of bad Salon pictures, in which men with hats on the backs of their heads were wolfing food from a counter. “It was the institution of the “free lunch” I had struck. You paid for a drink and got as much as you wanted to eat. For something less than a rupee a day a man can feed himself sumptuously in San Francisco, even though he be a bankrupt.
Remember this if ever you are stranded in these parts.?  TANSTAAFL, on the other hand, indicates an acknowledgment that in reality a person or a society cannot get “something for nothing”. Even if something appears to be free, there is always a cost to the person or to society as a whole even though that cost may be hidden or distributed. For example, as Heinlein has one of his characters point out, a bar offering a free lunch will likely charge more for its drinks