The last perakim of Mishneh Torah discuss the messianic process. The 11th perek discusses the role of Moshiach. In particular, the first halachah discusses the "order of operations:"
א המלך המשיח עתיד לעמוד, ולהחזיר מלכות בית דויד ליושנה הממשלה הראשונה, ובונה מקדש, ומקבץ נדחי ישראל. וחוזרין כל המשפטים בימיו, כשהיו מקודם: מקריבין קרבנות, ועושין שמיטין ויובלות ככל מצותן האמורה בתורה.
The 1) King messiah will arise in the future and return the kinship of the house if David to its ancient kingship, 2) rebuild the temple, and 3) gather in the exiled of Israel. 4) And returns the judgements (courts) in his days like they were before: 5) bringing sacrifices, and making sabbatical and jubilee years like all the commandments conveyed in the Torah.
This seems to establish a clear chronology, and many commentators discuss where the ordering diverges from Talmudic sources (see the back of the Frankel Rambam for explicit examples).
The Anshei Kinesses HaGedolah (Men of the Great Assembly) organized the Amidah, in which we pray for the redemption, among other things. The order they established is: 1) the ingathering of exiles, 2) reestablish our judges and advisors, 3) rebuilding Jerusalem, 4) bringing the messiah and reinstating the Davidic kingship and 5) rebuilding the temple and reinstating sacrifices.
The order we pray in seems distinctly different than that invoked by the Rambam. In fact, one might argue that the prayer order is closer current historical experience: the return of Jews to Israel from around the globe, the resurgence of Torah institutions in Israel, the building and rebuilding of cities throughout the land... According to some, when we cross the point where the majority of Jews are residing in Israel (which will be fairly soon) many dormant laws will come back into effect.
Is there an explanation for why the Rambam diverges from the order in which we pray for redemption? Conversely, is there an explanation for why the Sages instituted an order for prayer at odds with the expected order of redemption?