Moshe’s intent was to teach to future generations the concept of prayer to HaShem. It is impossible for a person to pay back to HaShem for what He has already done for the benefit of that person. The Medrosh explains that a person cannot do the mitzvah of Tzitzis until HaShem gave him a Talis; a person can not do the mitzvah of Mezuzah until HaShem gives him a house. Thus, Moshe demonstrates proper prayer that he is requesting a gift from HaShem to enter the Land, since he cannot request it as a reward for his good actions (HaShem preceded Moshe’s performance of Mitzvos with the abilities and means to perform the Mitzvos).
HaShem answered Moshe רב לך (much to you) indeed you do have many Mitzvos and good deeds. Even so, do not speak anymore on this matter. The words רב לך alludes to the Medrosh (Koheles page 82) on the verse “what benefit to a person for all your strivings that are done under the sun.” A person that does all the Mitzvos possible in the world is not able to pay back to HaShem for the benefits provided by the Sun (just one servant in the universe). This alludes to the concept that Moshe who is liken to the Sun (Bava Basra 75) in that he lights up the entire world.
