There are some hadiths (listed on the bottom) regarding doing Hajj which confuse me in connection with the following hadith:
The Messenger of Allah (sal Allahu alaihi wa sallam) said: “When a man dies, his deeds come to an end except for three things: Sadaqah Jariyah (ceaseless charity); knowledge which is beneficial; or a virtuous descendant who prays for him (the deceased).” [Sahih Muslim]
According to this hadith, nothing can be added to the deeds of a deceased, including doing Hajj for him. If this is so, why did the Prophet Muhammad (PBUH) allowed doing Hajj for the deceased or is Hajj an exception or you can perform the Hajj-e-Badal but its reward will not go the deceased.
How to reconcile these hadith?
Narrated Abdullah bin Abbas. Al-Fadl (his brother) was riding behind Allah's Apostle and a woman from the tribe of Khath'am came and Al-Fadl started looking at her and she started looking at him. The Prophet turned Al-Fadl's face to the other side. The woman said, "O Allah's Apostle! The obligation of Hajj enjoined by Allah on His devotees has become due on my father and he is old and weak, and he cannot sit firm on the mount; may I perform Hajj on his behalf?" The Prophet replied, "Yes, you may." That happened during the Hajj-al-Wida (of the Prophet). -- Sahih Al-Bukhari Hadith - 2.589
Editor's note: Three hadiths were linked, however two were the same link [the hadith above], and one no longer works, but a cached version on Google writes:
Narated By AbuRazin: A man of Banu Amir said: Apostle of Allah, my father is very old, he cannot perform hajj and umrah himself nor can be ride on a mount. He said: Perform hajj and umrah on behalf of your father.