"Grave robbing was not a criminal offense. Stealing a pig or a goose was punishable by death, but in the eyes of the law a body was not property and therefore couldn't be stolen. The body-snatchers were careful to leave the shroud and clothes behind in the coffin because they were property."
-- Smoking Ears & Screaming Teeth
by Trevor Norton, p8
This is a true account of the medical trade in the 18th and 19th centuries. Bodies were needed in order for surgeons to learn their craft. This got exactly as ugly as you can imagine. It led to no less than outright murder in order to obtain another cadaver.
There are accounts of criminals being hanged while surrounded by surgeons and those who supplied bodies to surgeons, and they would fight, tug-of-war style, over the fresh corpses. In one instance, the jostling over the the body was rough enough to actually resuscitate the condemned!
Some people were 'specialists' in retrieving corpses from fresh graves. Sometimes they were able to retrieve the bodies before the funeral, which in reality was being held around a casket full of stones. These experts in corpse acquisition were known as "Resurrection Men."