Hadith: Whoever attends a funeral until he offers the funeral prayer will get a reward equal to one Qirāt; and whoever attends it until the dead person is buried will get a reward equal to two Qirāts. It was asked: What are the two Qirāts? He replied: Like two huge mountains
عن أبي هريرة رضي الله عنه عن رسول الله صلى الله عليه وسلم قال: «مَنْ شهدَ الْجَنَازَةَ حتى يصلَّى عليها فله قِيرَاطٌ، ومن شهدها حتى تُدفن فله قِيرَاطان، قيل: وما القِيرَاطَانِ؟ قال: مثل الجبلين العظيمين».
ولمسلم:«أصغرهما مثل أُحُدٍ». [صحيح] - [متفق عليه] المزيــد ...
Abu Hurayrah (may Allah be pleased with him) reported: “The Messenger of Allah (may Allah's peace and blessings be upon him) said: "Whoever attends a funeral until he offers the funeral prayer will get a reward equal to one Qirāt; and whoever attends it until the dead person is buried will get a reward equal to two Qirāts." It was asked: "What are the two Qirāts?" He replied: "Like two huge mountains."
In a narration by Muslim: “The smallest of them is like Mount Uhud.” Sahih/Authentic. - [Al-Bukhari and Muslim]
Allah, the Almighty, is kind towards His slaves and He wills to facilitate for them the means of forgiveness. Hence, the Prophet (may Allah's peace and blessings be upon him) urged us to join the funeral procession and prayer, for this is a type of intercession that leads to mercy.
Allah, the Almighty, has made the reward of whoever attends the funeral prayer equal to one Qirāt, and whoever attends the funeral till burial another Qirāt of reward. Such is a great reward whose specific amount is known to our Lord.
Since the Companions (may Allah be pleased with him) had no knowledge about how much this reward was, the Prophet (may Allah's peace and blessings be upon him) tried to bring it closer to their understanding, stating that each Qirāt is like a huge mountain.
Such an act entails a great reward because it involves the fulfillment of the rights of one's fellow Muslims, supplication for them, a reminder of death and the Hereafter, giving solace and comfort to the relatives of the deceased, as well as other benefits.