In responding to Moshe's reticence to accept the Divine mission of leading the Jewish people out of Egypt, and, according to Rashi, quoting Chazal, his not wanting to sidestep his brother, Aharon, Hashem states: "Behold, Aharon, your brother, the Levite, I know he knows how to speak, and behold he [will] go out toward you, and he will see you and be happy in his heart" (Shemos 4:7). Later, the Torah records, "And Hashem spoke to Aharon, 'go toward Moshe to the desert'; and he went and met him at the mountain of G-d, and he kissed him" (ibid. v. 27). Commenting on these verses and related episodes, the Midrash (Yalkut Shimoni 141) writes:
[R. Yitzchak b. Maryon stated:] When a person does a mitzvah, he should perform it with a joyous heart. If Reuven had known that the Holy One blessed be He would write concerning him, "And Reuven heard and save him (Yosef) from their hand", he would have carried him on his shoulders and brought him to his father. If Aharon had known that HKB"H would write concerning him, "and also he [will] go out toward you...", he would have gone out toward him (Moshe) with drums and dances. If Boaz had known that He would write concerning him, "And he offered her (Rus) parched corn", he would have brought fattened calves and fed her. In the past, a person would do a mitzvah and the prophets would record it; now that there are no prophets, who writes it down? Eliyahu and Mashiach with Hashem sealing it, as it is written, "Then those who fear G-d spoke with each other, and Hashem paid attention to them and heard, and a book of remembrance was written before Him about those who fear Him and contemplate His name" (Malachi 3:16).
At first glance, this Midrash appears to be saying that these Biblical giants, motivated by future fame, would have acted with greater zeal. But one would expect that they would certainly fulfill the dictum of Antigonus of Socho (Avos 1:3) not to serve Hashem motivated by reward! The commentaries on the Midrash offer different approaches to resolve this difficulty. Some suggest that the meaning of the Midrash is that had they known that these actions would be publicized by Hashem in the Torah, they would have magnified them in order that these acts serve as even better models to emulate. They were motivated not by the pursuit of personal glory but in order to accomplish greater moral teaching (Etz Yosef). Others suggest that in each case, there was some important concern which led them to tone down their respective actions. But had they known that Hashem would grant his "seal of approval" to their actions, they would have performed their acts of kindness more fully, as was their initial desire (Yedei Moshe, Tiferes Tzion).
Perhaps we can suggest an alternate interpretation. The Talmud (Berachos 6b with Rashi) teaches that prayer is "מדברים שעומדים ברומו של עולם", one of the most exalted matters in the world, but "בני אדם מזלזלין בה". The Baal Shem Tov is quoted as saying that "zilzul" here does not mean degradation, but not realizing the full impact. Had people realized that prayer quite literally comes directly before G-d's Heavenly throne, they would be motivated to pray with even greater energy. The Midrash is highlighting this same truth concerning all human positive action. Each mitzvah act is eternal, cosmic, and world-changing which has lasting impact not only on the performer of the action but on the entire world, both our lower one and the upper spiritual worlds. In the beautiful, encouraging words of Nefesh HaChayim (1:4):
Let no Jew say in his heart, chas v'shalom, "What am I and what is my power to effect anything in the world with my lowly action?" Rather, he should understand, know, and firmly establish in his mind that all the details of his actions, words and thoughts at every moment are not lost, chas v'shalom. How great are his actions, and how exalted they are! Each one soars [heavenward] according to its root to bring about its [particular] effect in the most exalted, elevated worlds, polishing (?) the heavenly illuminations.
But these truths are not readily apparent in our world. The far-reaching effects of every mitzvah are not immediately perceived. The Midrash therefore comments that even among great spiritual giants, the more they would reflect on the unfathomable effects of their actions - indicated by their being recorded in the eternal Torah, the more they would invest them with even greater perfection. Lest we think that the enormous effect of mitzvos is only true of those performed by the highly righteous, the Midrash concludes that the actions of every Jew are duly recorded by Eliyahu and Mashiach and brought before Hashem Who, with his seal, indicates their absolutely transcendent and eternal nature.
Furthermore, it would appear that an important distinction can be made between honor which serves as a source of personal gratification or even of denigration of the significance of others versus recognition which serves as an important source of motivation. Chazal teach us (Nedarim 62a): "A person should not say: 'I will read [Tanach] so that they should call me "Chacham"; I will study [Mishna] so that they should call me "Rebbe"; I will analyze so I should be an elder of the study academy. Rather, learn out of love and honor will eventually come." Essentially, this passage repeats the teaching of Antigonus of Socho quoted above of the ideal of selfless service of our Creator. Surprising then is the conclusion indicating that "honor will eventually come" which seems to just substitute another - if delayed - form of ulterior motive. An analysis of the prooftexts adduced by the Gemara can lead to the conclusion that the honor which is being described is a reference to reward in the afterlife, the ultimate cleaving to G-d. But a parallel passage in Sifrei (Eikev 48) seems to clearly indicate that the honor which "will eventually come" is also in this world. This solidifies the problem raised above. Doesn't the knowledge that one will be honored for his Torah study detract from its purity?
Perhaps the answer is as briefly stated above. All human action requires some form of motivation. The purest of motives is totally selfless service of the Creator. But knowing that one's actions are significant and recognized by others - without that recognition being solely for the purpose of personal pleasure - serves as one of the most powerful incentives to continue to perform such acts and even magnify them. To be sure, Chazal speak of chessed shel emes, a true kindness consisting of actions which will not be recognized by any people down below in Olam Hazeh, but one cannot ignore the enormous drive which motivational recognition can cause.
The Gemara (Shabbos 89a) records that when Moshe went up on high, he saw Hashem tying crown to the letters of the Torah. After Hashem's rebuking Moshe for not greeting Him ("Ein shalom b'ircha?"), Moshe responds that it would be highly inappropriate for a servant to greet his master without permission. Hashem then replies, "[Nonetheless,] You should have helped Me." Rashi explains that the expectation was that Moshe should have blessed Hashem that He be successful in His activity, in a manner similar to the proverbial "yasher koach!" The difficulty with this passage is obvious. I believe I once heard from a prominent Rabbinic personality (not quoted by name here for fear of misquoting) that even though Hashem does not need any help, He was teaching us that it is part of the human experience to generally need recognition of the value of one's actions to serve as a meaningful motivation to produce even more. Since we are meant to walk in the ways of Hashem, "v'halachta bidrachav", Hashem placed into the record, so to speak, this form of behavior concerning Himself. Notwithstanding the delicate, and often confusing, differentiation between the non-ideal pursuit of personal glory and valuable reinforcement through recognition, the significance of such recognition remains central in my humble opinion.
Interestingly, Tiferes Tzion on the original Midrash quoted explains that specifically Eliyahu and Mashiach record these actions since they - the harbinger of the final redemption and the redeemer respectively - sense how each mitzvah brings the final redemption closer. May we always increase our awareness of the elevated status of even seemingly simply acts of avodas Hashem both between man and G-d and man and fellow man leading to even greater perfection in their performance ultimately leading to the final redemption!
[1] See also The Immense Effects of Mitzvot for a related treatment of the topic presented.