All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
Firstly, we would like to point out that this Hadeeth, to which the questioner referred, was cited in Sunan At-Tirmithi. Scholars of Hadeeth held different opinions regarding its authenticity; some considered it Dha'eef (weak), some considered it Hasan (good) or Saheeh (sound). Shaykh Ibn ‘Uthaymeen was asked about the authenticity of this Hadeeth and he answered: “Scholars held different opinions about its authenticity; however, if a person did that act hoping for the reward of Allaah, we hope that there is no harm in that.” He also said, “Some scholars do not consider it authentic and consider it to be weak."
Under the assumption that this Hadeeth is authentically attributed to the Prophet this does not undermine the status of Hajj or ‘Umrah because gaining equal rewards for performing them does not exempt someone from performing these religious obligations.
Moreover, the great reward stated in the Hadeeth is for performing a great act of obedience which is the remembrance of Allaah. The Hadeeth reads, “…then sits remembering Allaah until the sun rises…” Verily, the remembrance of Allaah is one of the greatest acts of worship; Allaah, The Exalted, says (what means): {…and the remembrance of Allaah is greater. And Allaah knows that which you do.}[Quran 29:45] Al-Baghawi commented on this verse in his Tafseer, saying, “This verse means that the remembrance of Allaah is the best act of obedience.”
It was related that the Prophet said: “Shall I tell you about the best of deeds, the most pure in the sight of your Lord, the one that is of the highest order and is far better for you than spending gold and silver, even better for you than meeting your enemies in the battlefield where you strike at their necks and they at yours?" The Companions replied, "Yes, O Messenger of Allaah!" He said: "Remembrance of Allaah, The Exalted." [Ahmad and others]
If you contemplate these texts and realize the status and reward of the remembrance of Allaah, you will find it easy to understand the Hadeeth.
Also, you should know that these generous rewards are from Allaah, The Exalted, and He rewards His slave generously for simple righteous deeds. He may grant many times the reward out of His generosity and grace. He may even grant such generous rewards for a person’s good intentions without acting upon them. The Prophet said: “... a slave whom Allaah provides with knowledge, but He does not provide with wealth. So he has a truthful intent, saying: 'If I had wealth, then I would do the deeds of so-and-so with it.' He has his intention, so their rewards are the same...” [Ibn Maajah]
The same applies to the Companions who, for some valid reason, did not participate in Jihaad with the Prophet . The Prophet said, “There are some people in Medeenah who were with you all the time; you did not travel any portion of the journey nor did you cross any valley but they shared the reward with you. They were kept behind by an excuse.” [Al-Bukhari and Muslim and the wording is cited by Ibn Maajah]
Those people were granted the rewards for participation in Jihaad for their sincere intentions; this was out of the grace of Allaah. Verily, He is worthy of such generosity and grace.
Ibn ‘Uthaymeen was asked about the meaning of this Hadeeth, to which you referred in the question, “Does this mean that whoever does such an act would gain equal rewards for performing Hajj and ‘Umrah; or what does it mean exactly?” He replied:
"Firstly, the authenticity of this Hadeeth was questioned by some scholars; many of the scholars and critics of Hadeeth have labeled it as weak.
Secondly, if we consider the Hadeeth authentic, there are no fixed standards for the rewards; a person may be rewarded for a simple good deed with generous rewards equal to those of a great deed because the rewards are granted by the grace of Allaah. He bestows His grace on whom He pleases; Allaah is the Lord of abounding grace."
Allaah Knows best.