It's called a MORTSAFE: https://en.wikipedia.org/wiki/Mortsafe
The cages were used to stop GRAVE ROBBERS from stealing corpses for use by MEDICAL STUDENTS and ANATOMISTS. They were regularly used in Scotland in the early 19th century.
RESURRECTIONISTS were BODY SNATCHERS commonly employed by anatomists in the United Kingdom during the 18th and 19th centuries to exhume the bodies of people who had recently died.
https://en.wikipedia.org/wiki/Resurrectionists_in_the_United_Kingdom