Rabbi Shimon ben Pazi pointed out a contradiction between verses. One verse says: “And God made the two great lights” (see Bereishit 1:16) and immediately the verse continues: “The greater light . . . and the lesser light.”
When they were first created, the sun and the moon were equally bright. The moon said unto the Holy One, blessed be He, “Master of the Universe! Is it possible for two kings to wear one crown?” He answered: “Go then and diminish yourself.” “Master of the Universe!” cried the moon. “Because I have suggested that which is proper must I then make myself smaller?” He replied: “As compensation, go and rule by day and by night.” “But what is the value of this?” cried the moon. “Of what use is a candle in broad daylight?” He replied: “Go. Israel shall count the days and the years with you.” “But it is impossible,” said the moon, “to do without the sun for the counting of the seasons, as it is written: ‘And let them be for signs, and for seasons, and for days and years.'” “Go. The righteous shall be named after you as we find, Ya’akov the Small (see Amos 7:2), Shmuel the Small, David the Small (see I Shmuel 17:14).” On seeing that the moon would not be comforted, the Holy One, blessed be He, said: “Bring an atonement for Me for making the moon smaller.” This is what was meant by Rabbi Shimon ben Lakish when he declared: Why is it that the he-goat offered on the new moon is distinguished in that there is written concerning it “For the Lord” (see 28:15)? Because the Holy One, blessed be He, said: Let this he-goat be an atonement for Me for making the moon smaller.
The Maharal MiPrague writes that by means of this description of negotiations between the moon and God, the Sages are attempting to describe different elements of Creation. The story itself is interpreted in many different ways, among them an explanation put forward by the Maharsha that the moon is a metaphor for the Jewish People. On its most basic level, this is a description of the limitation on the full spiritual light that is to be found in this world, a situation that will change in the World to Come, as described in Sefer Yeshayahu (30:26) “Moreover the light of the moon shall be as the light of the sun…”