"...a covenant with you [and with Israel]" (Exodus 34:27). For the sake of the Torah I love Israel; and not Israel alone, but even Moses He magnified by the merit of the Torah, "for in accordance with these words I have cut a covenant with you." And in what way did He magnify Moses? Rabbi Samuel said in the name of Rabbi Jeremiah bar Isaac: All the glory that he saw in this world, he took nothing from the principal; rather, the principal remains standing for him for the world to come.
Why God Loves Israel and Moses Through the Torah
Midrash Tanchuma Buber, Ki Tisa 18:2
אתך ברית [ואת ישראל] (שמות לד כז). בשביל התורה אני אוהב את ישראל, ולא ישראל בלבד, אלא אפילו משה [גדלו] בזכות התורה, כי על פי הדברים האלה כרתי ברית אתך ומה גידל את משה, אמר ר' שמואל בשם ר' ירמיה בר יצחק כל כבוד שראה בעולם הזה לא נטל מן הקרן כלום, אלא הקרן קיימת לו לעולם בא.