Regarding the hadeeth,
Abu Ayyub Khalid bin Zaid (May Allah be pleased with him) reported: Messenger of Allah (ﷺ) said, “Were you not to commit sins, Allah would create people who would commit sins and ask for forgiveness and He would forgive them”.
[Muslim]
Ash-Shaykh Bin Baaz, رحمه الله said:
…معنى الحديث أن الله سبحانه وتعالى قضى في سابق علمه أنه لابد من وقوع الذنوب حتى تظهر آثار مغفرته ورحمته سبحانه
The meaning of the hadeeth is that Allaah سبحانه وتعالى has ordained with his preexisting knowledge that sins will have to occur in order for His forgiveness and His mercy to take an effect….
وليس معناها الترخيص في الذنوب لا، الله نهى عنها وحرمها، لكن سبق في علمه أنها توجد وأنه سبحانه يعفو عمن يشاء ويغفر لمن يشاء إذا تاب إليه، فهذا فيه دلالة على أن هذا لابد منه فلا يقنط المؤمن لا يقنط ولا ييئس، ويعلم أن الله كتب ذلك عليه، فليتب إلى الله ولا ييئس ولا يقنط وليبادر بالتوبة والله يتوب على التائبين.
…And it doesn’t mean that there is a concession for committing sins, no. Rather Allaah has forbade it and made it unlawful. However, it has been predecreed with the knowledge of Allah that the sins will be present and that Allaah will pardon whom He wills and forgive whom He wills if the person repents. Therefore, this is an indication that it is something to occur, so the believer shouldn’t despair. He shouldn’t lose hope and be taken by despair. He should know that Allaah has decreed this upon him, thus let him repent and not lose hope and not to despair and let him haste to making tawbah.
…فليس القدر حجة ولكن عليك أن لا تقنط وأن لا تيئس وأن تتوب إلى الله سبحانه وتعلم أن هذا شيء قضاه الله عليك وعلى غيرك.
…The Qadr isn’t a proof [for you to justify your sins]. However, it is upon you not to despair and not to lose hope. You should repent to Allaah سبحانه وتعالى and know that this something Allaah has decreed upon you and upon other than yourself…” End quote. [Reference]
Translated by
AbdulFattaah Bin Uthman
Abu Fajr