Why does Lord Shiva stay in the burial grounds?
Once Maa Parvati asks the question to God Shiva Ji- O Swami, why do you visit or stay in burial grounds fo so long hours?
God Shiva Ji– Devi Parvati, when people die, their body becomes pure. with the body losing its life, all the impurities also go away. That’s why I visit or stay in burial grounds and apply the ash of burnt dead bodies upon myself.
Maa Parvati- I am still not satisfied, what is a more, appropriate reason for visiting burial grounds?
Shiva Ji- Devi Parvati, I visit burial grounds and take control of the spirits that come out of the dead bodies.
Mata Parvati– Why so? Why you take control of ghosts and spirits in burial grounds?
Shiva Ji- I take control of ghosts and spirits in burial grounds so that these ghosts and spirits don’t trouble my innocent children, my human beings.
Mata Parvati– O dear Mahadev, you are great. Because of the welfare of your children, human beings, you yourself live in burial grounds, among ghosts and spirits. You are very merciful my swami.
Source : https://www.quora.com/Why-does-Lord-Shiva-roam-in-the-burial-grounds