This Hadith is regarded as a concrete proof that Rasulullah (SAWA) did not leave this world and the Muslim Ummah without leadership. Perhaps the question, which comes in our minds, is that why the need for Harun to be appointed as leader while Nabi Moosa (a.s) was away, because Harun was also a Nabi? This tells us clearly that Prophethood (Nubuwwat) and Leadership (Imamate) are two different matters, and one needs to be appointed to be a leader while being a Prophet at the same time. Prophethood is therefore not a direct inference of Imamate.
According to Afosa.org, this Hadith naturally becomes a big point of debate. Hence, another question, which arises, is that this Hadith was for a very particular moment. The context is that our beloved Prophet Muhammad (SAWA) was on his way to the Battle of Tabuk, which was a faraway location. For that period of time, he informed Imam Ali (a.s) to take care of leadership matters while he (Rasulullah (SAWA)) is away.
History has recorded that Imam Ali (a.s) complained, asking Rasulullah (SAWA) why he is not being taken along to Jihad, and instead being left behind to take care of the women and children? It is on this point where Rasulullah (SAWA) told Imam Ali (a.s): “O Ali, you are to me like Harun was to Moosa, except that there will be no Prophet after me.”
So, the argument presented by those who do not accept Imamate is that this Hadith was only in reference to this short period of time when Rasulullah (SAWA) left for Tabuk. They then argue that this cannot therefore be extrapolated to mean that Rasulullah (SAWA) appointed Imam Ali (a.s) as the permanent leader after him.
This is of course, extremely unfair, and the way of thinking when you look at Hadith with the spectacles of prejudice! This Hadith is in no way restricting the position of Imam Ali (a.s) to that particular event of the Battle of Tabuk.
To clarify, this Hadith is saying that the status of Imam Ali (a.s) is like that of Harun, except that there will be no further Prophet. This status does not change after Rasulullah (SAWA) returns from Tabuk!
These opponents of Imamate then argue further that Nabi Harun (a.s) passed away during the lifetime of Nabi Moosa (a.s). The clarification of Rasulullah (SAWA) to Imam Ali (a.s) in this Hadith, that there will no Prophet after him is important to understand in response to this element of critique.
If Rasulullah (SAWA) was speaking specifically in reference to that short period of his absence while at the Battle of Tabuk, then this statement that there will be no Prophet after him does not make sense, because Rasulullah (SAWA) is still around, whether it be Madina or Tabuk! He is still the final divine Prophet, and nobody can become a Nabi in his presence or after.