The Mishna (2a) taught that when a person who was tameh was unaware of his status and he entered the Temple or ate consecrated food, since he cannot bring a sacrifice for atonement (given that he was unaware that he had done anything wrong), sacrifices brought on holidays and on Rosh Ḥodesh (the New Moon) serve to offer him that atonement. The source for this is the passage (Bamidbar 28:15) that describes how the sacrifice is a sin offering la-HaShem – to God – which is understood to refer to sins that only God is aware of.
The Gemara quotes another teaching derived from this passage. Reish Lakish says that the sacrifice brought on Rosh Ḥodesh makes reference to a sin offering la-HaShem because God says to the Jewish people that this sacrifice should be brought to atone for God having minimized the moon. The idea that God made the moon smaller is discussed at length in the Gemara Ḥullin (60b) where the Gemara describes that originally both the light of the day – the sun – and the light of the night – the moon – were the same size, but that God made the moon smaller after it complained that two equal rulers could not exist together (see also Rashi on Bereshit 1:16).
The way the text of our Gemara reads, it appears that God asks that the Jewish people bring a sacrifice on God’s behalf, since he performed an inappropriate act in minimizing the moon. That approach is certainly a difficult one to understand, although some commentaries suggest mystical explanations for such a request. The Ri”f explains that the sacrifice is certainly brought to atone for sins done by the Jewish people – as Rabbi Yehuda explained, for unknown sins – but God commanded that it be brought on Rosh Ḥodesh by way of consolation to the moon for having lost its primary place in creation.