Skeleton in the Cupboard/Closet

"Skeleton in the Cupboard/Closet"   What is the origin of this saying?

Meaning to have "hidden away a shameful or embarrassing secret," the term "skeleton in the cupboard" originates from the legalisation of human body dissections. Grave diggers would present corpses to doctors to dissect and, because of the controversy, the doctors would hide away their secrets in a locked cupboard.  

Competing theory:

None offered

(Suggest another theory on this grammar chat forum.)  

You can discuss the origins of this saying on this grammar chat forum.