Possible origin being: A "pig in a poke" scam from the 1500's, where a customer buying a suckling pig in a sack would actually be sold a (less valuable) cat, and would not realise the deception until the bag was opened. This is contested but has been mentioned in texts from the period.