The Phrase Finder explains that that the expression refers to an “…offering or deal that is foolishly accepted without being examined first. The expression is part of British commercial law “caveat emptor”—which is Latin for “let the buyer beware.” The expression has been around for over five hundred years and is a warning that you should check the bag (poke) to verify that you are really buying a pig and not an animal of lesser quality. As a bonus, the expression is also the origin of “letting the cat out of the bag.”