Much of Sefer Neviim is not written in chronological order. For example; Sefer Melachim ends with the destruction of the first Beis Hamikdash by Nevuchudnetzar, but many of the Trei Asar (such as Hoshea and Amos) lived many years before this event, still during the time of the Beis Hamikdash. However, their Seforim are ordered after the book of Melachim.
However, the book of Malachi is not merely written last, but also chronologically took place the latest of any of the books of the Neviim. The Gemara tells us that Malachi was none other than Ezra, who was the last of the Neviim. Thus, Malachi is the end of the book of Neviim in both the written and chronological order, being the final Nevua given to man (until the time of Moshiach).
The era of Nevua ends with a passuk that we repeat, in which Hashem tells Malachi about the time before the coming of Moshiach; “Behold I am sending Eliyahu the prophet to you… and he shall return the hearts of fathers with their sons… (to Hashem in Teshuva)”
Rabbi Hadari sought to explain the reason for Eliyahu`s involvement in this process. In Melachim Beis, chronologically many hundreds of years earlier, we read that Eliyahu ascended to heaven, and he has not appeared since! Yet, here Hashem is assuring Malachi that Eliyahu is the one who will herald the time of Mashiach. Why is Eliyahu chosen to have this important role in the time leading up to Mashiach?
Rav Hadari explained that Eliyahu was given a unique role by Hashem to guard the continuity of Jewish history. Whenever there is a paradigm shift or change from era to era/chapter to chapter of Jewish history, Eliyahu ensures that it goes smoothly, and that Bnei Yisrael continue.
This type of shift first occured at the time when the era of Nevua, the ability to have pure and clear contact with Hashem, came to an end. Thus, Eliyahu is the subject of the final pesukim of Nevua. The Gemara relates that Eliyahu was found in the Beis Hamedrash of Rebbi (the author of the Mishna) and Ravina (the author of Talmud Bavli). At these two essential points of Jewish history; the codifying of the Torah SheBa`al Peh (Oral Law), and the writing of the Gemara which will be the focal point for Torah learning for the rest of the Galus, Chazal are assuring us that Eliyahu is there. Pinchas smote Zimri and Kozbi for committing adultery and this act ended the plague. It is no coincidence that Eliyahu was Pinchas; he ensured that someone took a clear stand against the blatant immorality and saved Bnei Yisrael. Ultimately, in the unpredictable times leading up to Moshiach, the advent of the redemption, Eliyahu will be found as well.
Eliyahu’s role is to ensure the continuity of Bnei Yisrael. For this reason, Eliyahu attends every baby boy’s bris to demonstrate this idea that a new generation has entered into the covenant originating from Avraham Avinu. Hashem provided a sign for us 3000 years ago that Jewish History will always continue. Even when Bnei Yisrael move into a new and unpredictable era, we can be assured about our future; Hashem has already appointed His messengers to ensure our continuation as a people.