Elijah the Prophet offered Olah Sacrifices outside the Temple, seemingly performing a sin, in order to cause the children of Israel to repent their ways. And this indeed corresponds to the ruling of the halacha: A prophet can cancel a mitzva on a temporary basis ("hora'at sha'ah"), as is written, "It is time to act for G-d, they have violated Your Torah" [Psalms 119:126].
Elijah learned this concept of descending to the level of the nation from Aaron, the High Priest, who actively participated in the sin of the Golden Calf and joined the people in their hour of need. Moses, on the other hand, descended from Mount Sinai and immediately treated the sinners with strict justice. We can say that Moses assumes that man is inherently good, and therefore no sin can be tolerated. Aaron, on the other hand, recognizes the practical possibility of sin and leaves room for atonement. Moses operates in a mode of "lechatchila" – a priori – while Aaron sees matters as "be'di'avad" – after the fact. The way to combine these two approaches is to understand that man is indeed inherently good but that he can sometimes do a sin (the sin is an external and temporary phenomenon).
We can see an example of this combination in the command of the Passover Sacrifice in Egypt, in the Torah portion of Bo. The lamb for the sacrifice is slaughtered outside the Temple (and outside of the bounds of the Land of Israel), the sprinkling of the blood and the consumption of the sacrifice take place within the homes of the people, in a very unique and unusual way (the homes of the people take on a role similar to that of the Altar, where the blood of the other sacrifices is sprinkled, and the flesh of the sacrifice is eaten within the "Altar"). All of this is done on a temporary basis ("hora'at sha'ah"), in Egypt itself. And it is not repeated in later generations.
However, in this case the people are following an explicit command given to them by G-d. It is no accident that the introductory verse to this command begins with the words, "And G-d said to Moses and to Aaron in the Land of Egypt, saying..." [Exodus 12:1]. This is a unifying point, where the Torah of Moses and the Torah of Aaron meet.
The Haftarah of Shabbat Hagadol, Malachi, the last of the prophets, maps out for us the path that will lead to exile, when prophecy will no longer exist within Israel: "Remember the Torah of my servant Moses which I commanded him at Horeb, giving all of Israel laws and decrees." [3:22]. The Torah of Aaron is not useful at a time when prophecy does not exist. But on the other hand, the Torah of Moses might be a cause of great weakness among the people, for what will they be able to do if they commit a sin? They will not have prophets who can give them a temporary respite which will show them how to repent! And therefore the prophet ends his declaration with words of comfort: "Behold, I am sending you Elijah the Prophet before the coming of the great and awesome day of G-d. And he will bring the hearts of the fathers back with the hearts of the sons, and the hearts of the sons back with the hearts of the fathers, lest I come and strike down and devastate all the earth." [3:23-24].
Before the day of judgement arrives, the Holy One, Blessed be He, will return to His people the spirit of prophecy, and specifically the powers of Elijah. He knew the secret of mending, and with its help the people will mend the situation, both fathers and sons. In this way they will all arrive at the Day of Judgement "with clean hands and a pure heart." [Psalms 24:4].
Source: “NOTES FROM THE HAFTARAH” – a biweekly column in Shabbat B’Shabbato (Zomet Institute) See: http://www.zomet.org.il/eng – Metzora 5776, issue 1620.