There have been funerary rites for centuries. Across the cultures, one thing that is constant is that it is disrespectful to disturb a tomb. When medicine began to study human anatomy in earnest there was a surge in grave robbing. How else could a student learn? And as various plagues killed massive swathes of the population and people were buried prematurely, cemeteries became a rather busy place (To be hired for the “graveyard shift” meant a family member paid you to watch over a loved one’s grave in case they wiggled a string tied to a bell from the coffin – being saved by the bell).
In Britain, where much of the medical research was centered in the 18th and 19th centuries, grave robbing for cadavers was so common most cemeteries had a watch house, a small cottage on the premises that had views of the entire property. Guards would take turns watching for Resurrectionists, as they were sometimes called. It was gruesome but lucrative work. Teaching doctors would pay handsomely for a recent burial. Just look at Burke & Hare.
The blog Britain’s Forgotten Bodysnatchers has several posts devoted to watch houses, along with the history of bodysnatching in general.
I think being a watch house guard wouldn’t have been so bad. Bring a book and a jug of tea. Walk around the cemetery every once in a while. At the very least, I think one would become quite philosophical about life.