Sometimes a market trader would put a cat in his bag and pretend it was a pig to fool the customer! So if someone lets the cat out of the bag, the secret would be open to us.
Letting the cat out of the bag is supposed to stem from a trick played in old markets where buyers were duped when they thought they were buying a Suckling pig.