It is said that what is intended by ‘traditions’ (sunan) here are the traditions of the people of truth (ahl al-haqq) and falsehood (batil), in other words, he wishes to clarify to us the traditions of both groups, thus he guides His believing slaves to the truth, and misguides others. For indeed guidance and misguidance come only after clarification, as He said: “And We have not sent a Messenger except with the language of his people in order to make things clear to them. Thus Allah misguides whoever He wills and guides whoever He wills. And He is the Almighty, the Wise.” (Ibrahim 14:4) He also said: “And Allah does not misguide people after guiding them until He has made clear to them what they should fear.” (al-Tawbah 9:115)
Thus ‘traditions’ (sunan) are connected with making the traditions of the people of falsehood clear, not those who are guided. While the people of truth are connected with His statement: “…and guide you.” (al-Nisa 4:26)
Az-Zajjaj said: ‘The traditions (sunan) mean paths, thus the meaning in the ayah: “Allah wants to make clear to you [the lawful from the unlawful] and guide you to the [good] practices of those before you and to accept your repentance. And Allah is Knowing and Wise.” (al-Nisa 4:26) is ‘He directs you to the way of His obedience, just as He has directed Prophets and their followers.’ This understanding is more appropriate since the two verbs in the sentence [clarify and guide] are advanced in the statement and the first one is not designed to be the lone governing word, rather it is either the second alone or both of the two, as in His statement: “Bring me molten copper to pour on it.” (al-Khaf 3:137) Or if the following meaning is intended: ‘to make clear to you the traditions of those who were before you and guide you to those traditions’, then it shows that He guides us to their traditions – that is to say, the traditions of the people of truth, in contrast to His statement: “Traditions have passed away before you” (Ali-Imran 3:137) for indeed after that He said: “So travel the world and see what the end of those who denied.” (Ali-Imran 3:137) Truly it means identifying the end of the oppressors by witnessing, and here He revealed for us from the Qur’an what will guide us of the traditions of those before us, and they are those whom Allah has favoured.
In this context, he mentioned three elements: clarification, guidance and repentance, because people first need to know what is good and evil, what is commanded and what is prohibited. After that, they need to be guided so they seek the truth and act by it as opposed to falsehood. This is the tradition of the Prophets and the righteous. After that, it is inevitable for them to sin, so they will want to be purified from their sins with repentance; therefore, they need knowledge and to act according to it, and repentance along with that. It is inevitable for them to fall short or be heedless in adhering to these traditions which Allah guided them to, so they repent from it in whatever has happened of negligence in each of these traditions. Keeping in mind that these traditions include acts which are obligated and those which are recommended, so it is inevitable for the one taking the path to fall short and be heedless, thus they seek forgiveness from Allah and repent to Him. And indeed the slave, no matter how much worship and obedience they show, cannot establish for Allah in truth that which He has obligated upon him, thus it is not possible to do so without seeking forgiveness and repenting after every act of obedience.
Gardens of Purification by Ibn Taymiyyah Pages 53-55