Let the cat out of the bag
Disclose a secret.
There are two commonly heard suggested origins of this phrase. One relates to the fraud of substituting a cat for a piglet at markets. If you let the cat out of the bag you disclosed the trick - and avoided buying a pig in a poke (bag). This form of trickery is long alluded to in the language and 'pigs in a poke' are recorded as early as 1530.
The other theory is that the 'cat' referred to is the cat o' nine tails, which was used to flog ill-disciplined sailors. Again, this has sufficient historical record to be at least possible. The cat o' nine tails was widely used and was referred to in print many years prior to the first use of 'let the cat out of the bag'. The 'nine tails' part of the name derives from the three strands of cord that the rope lashes were made from. Each of the cords were in turn made from three strands of string. When unbraided a piece of rope separated into nine strings. The 'cat' part no doubt alluded to the scratches that the knotted ends of the lash made on the victim's back, like those from a cat's claws.
Of the two explanations, the 'pig in a poke' derivation is the more plausible, although I can find no direct documentary evidence to link 'letting the cat out of the bag' to the selling of livestock. Versions of the phrase exist in both Dutch - 'Een kat in de zak kopen' and in German - 'Die Katze im Sack kaufen'. These both translate loosely as 'to buy a cat in a bag', that is, to buy false goods.
The cat o' nine tails story is dubious at best. It is reported that the lashes were sometimes stored in bags, but the suggested nautical punishment origin fails at the critical point, in that it doesn't match the 'disclose a secret' meaning of the phrase.
The first known use of the phrase in print that I have found is in a 1760 edition of The London Magazine:
"We could have wished that the author... had not let the cat out of the bag."
There are several other literary references to the phrase in the 1760s and 1770s, most of which place it in quotations marks - a sure sign of it being not commonly understood and consequently, newly coined.
Cats feature very often in English proverbs:
A cat may look at a king - 1546
All cats are grey in the dark - 1596
Curiosity killed the cat - 1921
There are more ways of killing a cat than choking it with cream - 1855
When the cat is away, the mice will play - 1607
This routine appearance of cats in the language is no doubt a consequence of them being widely kept as mousers and pets in domestic houses. As to 'who let the cats out?', we can't be certain; but it probably wasn't a sailor.