The universal custom of building a headstone (matzeiva in Hebrew) over a grave dates back at least as far as Jacob: "And Jacob erected a monument on her grave; this is Rachel's Tomb, a monument until today." (Genesis 35:20) Another famous headstone is Absalom's Pillar, which can be seen from the window of the bus on the way to the Western Wall.
There are three basic reasons for a headstone:
- To glorify the name of the deceased and perpetuate it.
- To show respect for the departed, especially a parent. Kabbalisticly, it benefits the soul, giving it a place - an address, so to speak.
- To show that someone is buried there, so people will avoid passing over the grave and becoming spiritually impure. This was especially important in Temple times, when purity and impurity had many halachic applications in everyday life. Some authorities maintain that for this reason, a matzeiva is virtually a Biblical command.
An important not: the matzeiva shouldn't be gaudy or ostentatious. Rather, it should conform to the average one in the community. The Chafetz Chaim writes that rather than buying an elaborate monument, children wishing to perpetuate their parents' names and benefit their souls would do much better donating the extra money to a charity which helps people do mitzvot and study Torah.