If what is meant is this narration:
کفاره الذنب الندامه و لو لم تذنبوا لأتى الله بقوم یذنبون لیغفر لهم.
The expiation for sin is regret; if you did not sin, God would bring forth a people who would sin so that He might forgive them.
نهج الفصاحه (A collection of the Prophet’s short sayings, صلى الله علیه و آله), p. 608
Since this narration is weak and mursal in its chain of transmission, and its content also conflicts with the textual evidence, it is better to suspend judgment on this hadith until, ان شاء الله, it can be presented to the presence of His Eminence, the Greatest Remnant of God, سلام الله علیه!
We know that God’s forgiveness is not limited to His overlooking sin. The All-Merciful, the Compassionate, the Tenderly Loving, and the Munificent Bestower have countless ways of granting forgiveness, and He is able to manifest it in ways beyond our comprehension!
On the other hand, we know that the Infallibles علیهم السلام were free from every sin, and yet occupy the highest station of receiving the forgiveness of the All-Compassionate and the Subtle!