This ḥadith has come down through so many chains that it has reached the level of tawātur (mass-transmission). The command to visit graves is accompanied by a statement of its wisdom: remembering the Hereafter and detaching oneself from the life of this world—two fundamental aims of Islam. Indeed, reflection, taking admonition, renouncing worldly allure, and yearning for the Hereafter are among the greatest aids that help a servant to attain taqwā (God-consciousness).
3 – The visitor to the graves will fall into one of four situations:
First: He prays for the dead, asking Allah to forgive them and show them mercy, giving special attention to the one he came to visit. He reflects on the condition of the deceased and what they have gone on to meet, and this produces in him a lesson, a reminder, and an admonition. Such a visit is prescribed by the Sharīʿah.
Second: He supplicates for himself and for those he loves while in the graveyard or beside a particular grave, believing that making duʿāʾ in cemeteries—or at the grave of a certain person—is better and more likely to be answered than making duʿāʾ in the mosques. This is a reprehensible innovation (bidʿah munkarah).
Third: He calls upon Allah while using the deceased as an intercessory means, saying, for example, “asʾaluka yā rabbī, grant me such-and-such bijāhi ṣāḥibi hādhā al-qabr (by the status of the occupant of this grave),” or “biḥaqqihi ʿalayka (by his right over You),” or “bimaqāmihi ʿindaka (by his rank with You),” and the like. Such an act is a prohibited innovation because it leads to associating partners with Allah.
Fourth: He does not supplicate to Allah at all; rather, he addresses the people of the graves themselves—or a particular occupant—saying, “yā walī Allāh (O friend of Allah), yā nabī Allāh (O Prophet of Allah), yā sayyidī (O my master), enrich me, give me such-and-such,” and similar words. This is major shirk.
4 – The ḥadith establishes that rulings in Islamic law can be abrogated.
5 – Allah’s rulings are tied to their underlying wisdom and secrets, for they were instituted to realize benefit; wherever the benefit is found, there lies the law of Allah.
6 – When the truth of a given opinion becomes clear to a Muslim, he is obliged to follow it and abandon whatever contradicts it.
7 – A person should do whatever reminds him of the Hereafter and take hold of every means that awakens him.