The ones who have believed, emigrated and striven in the cause of Allāh with their wealth and their lives are greater in rank in the sight of Allāh. And it is those who are the attainers [of success].
Providing Pilgrims with Water and maintaining the Sacred Masjid are not equal to Faith and Jihad
In his Tafsir, Al-`Awfi reported that Ibn `Abbas explained this Ayah: "The idolators said, `Maintaining Al-Masjid Al-Haram and providing water for pilgrims are better than embracing the faith and performing Jihad.' They used to boast and show off among the people because they claimed, they were the people and maintainers of Al-Masjid Al-Haram. Allah mentioned their arrogance and rejection (of the faith), saying to `the people of Al-Haram', who were idolators,
(Indeed My Ayat used to be recited to you, but you used to turn back on your heels (denying them, and refusing to listen to them with hatred). In pride, talking evil about it (the Qur'an) by night.) 23:66-67. They used to boast about being those who maintained the Sacred Sanctuary,
Verse 20 enlarges upon the subject initiated with the words: لَا يَسْتَوُونَ (la yastawun: they are not equal) in the previous verse (19) where it was said that the believing Mujahidin and those engaged only in maintaining the masjid and serving water to pilgrims are not equal. This was enlarged by saying: الَّذِينَ آمَنُوا وَهَاجَرُوا وَجَاهَدُوا فِي سَبِيلِ اللَّـهِ بِأَمْوَالِهِمْ وَأَنفُسِهِمْ أَعْظَمُ دَرَجَةً عِندَ اللَّـهِ ۚ وَأُولَـٰئِكَ هُمُ الْفَائِزُونَ ﴿20﴾ (those who believed and emigrated and took up jihad in the way of Allah, with their wealth and lives, are greater in rank in the sight of Allah, and they are the successful ones). The reason is that the Mushriks against them simply had no measure of success whatsoever. As for Muslims in general, they too shared this success in essence, but the success of those identified above had more to it. There-fore, they were the ones whose success was comprehensive.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 18–22
At the time when the Quran was revealed, the position in Arabia was that the Muslims had gathered round the Prophet Muhammad and the polytheists around the Ka‘bah. Till that time the histories of glories which we are now acquainted with had not yet become attached to the name of the Prophet Muhammad. He appeared to the people like an ordinary man. On the other hand, the Sacred Mosque of Makkah, because of the thousands of years of history attached to it, appeared to them a symbol of greatness and holiness. The polytheists saw themselves as being servants and retainers of the holiest shrine. On the contrary, when they saw the Muslims, they thought of them, under the circumstances prevailing at that time, as a group of people gathered around a madman.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.