A poke is a bag and way back in the day it was used to carry piglets, and other goods I'm sure, to market. The saying is actually "don't buy a pig in a poke" which is to say - don't buy something sight unseen, without examining it. Good advice then...and now. While the phrase today doesn't include the "don't buy" part it's still a reference to avoid foolish purchases.