It's from Robert A. Heinlein science fiction.  

There Ain't No Such Thing As A Free Lunch!  If a bar advertises a 'free lunch' the beer is priced higher to pay for it.

Anytime you 'get something for nothing' check around; you are going to have to pay somehow.