Q From Ian: Is it true that to let the cat out of the bag relates to flogging with a cat o’ nine tails?
A A theory that is indeed sometimes bruited about is that this phrase refers to the removal of the infamous tool of punishment, the cat o’ nine tails, from its canvas bag in preparation for shipboard punishment. But this doesn’t fit the meaning of the phrase, to disclose some secret, as punishment was made as public as possible in order to deter others. On the other hand, it would be possible to imagine a situation in which an officer’s discovering the truth behind some nefarious activity that would result in punishment could cause a sailor to remark, “That's let the cat out of the bag”.
The usual explanation is that it comes from a sneaky trick of a stall keeper in a market of handing over a bag that supposedly contained a valuable piglet but which instead had in it only a useless cat (so it would be a version of selling a pig in a poke); to let the cat out of the bag was to expose the fraud. But anybody who has ever kept a live cat in a bag for more than a couple of seconds will know that even the most gullible purchaser would hardly mistake it for a piglet. It may just possibly be that the phrase comes from the explosive exit of a cat from a bag when it’s opened, so suggesting an original connection more with the shock and surprise of the event than of disclosure of the secret itself.
But I suspect there’s some other explanation that has now been lost. We do know, though, that it is first recorded in the eighteenth century.