The story
Reportedly from the practice of substituting a butchered cat, etc. for a suckling pig when sold in a sack at a market. Other theories circulate but all involve the purchase of a cat in a bag, where the buyer expected better. poke refers to a bag or sack, and is related to pouch.
Etymology from Wiktionary, CC BY-SA 4.0.