It is necessary for the servant to know that the knowledge...
It is necessary for the servant to know that the knowledge of Allah preceded on everything that is going to happen in His creation and that He had foreordained everything with a solid and non-revocable planning." Usul al-'Aqida al-Tahawiyya, #47& #48 al-Ghazzali (d. 505) is yet another great Sunni theologian who wrote in his creed: "And that His intention (Irada) is of His Essence (Dhat), among His attributes. He has eternally been attributed by it.
He intended, in His Eternity, the existence of things at their destined moments. Thus, they came to existence at their proper times as He intended in His eternity without any advance or delay. They happened according to His knowledge and His intention, without any substitution or change (Ch. 1)... The first principle is to know that any event in the world is His action, His creation, His innovation...
and that had Allah disliked the sins and had He not intended it, then it would have been based on the intention of His enemy, that is Satan, the accursed. In that case, most of what happens would have been according to the intention of His enemy. This is the utmost weakness and helplessness, and the Lord of lords is most exalted from such a saying by the wrongdoers... It is admissible that Allah, the Exalted, charges/burdens the creation with that which they cannot bear...
It is for Allah, the exalted, to torture and to punish the creation even if they have not committed any crime. (Ch. 3)" Qawa'id al-'Aqa'id, al-Ghazzali, Ch.1&3 It is unanimous amongst the Sunni scholars that the will of Allah is eternal and that Allah never makes changes in His will. Some of them also clearly expressed that any event including people's evil deeds are Allah's actions, and had He disliked their happening He would not have let them exist.
The supporters of the school of compulsion have used many verses of Quran to strengthen their views. The fact that every thing, including our voluntary actions, happens according to the will of Allah has been clearly mentioned in many verses of Quran. For instance: "And ye shall not will unless Allah wills, the Lord of the Worlds. (81:29)" "They are not the ones to believe, unless Allah wills.
(6:111)" "Those against whom the Word of thy Lord hath been verified will not believe; Even if every Sign was brought unto them, until they see (for themselves) the painful punishment. (10:96-97)" "If Allah willed, they would not have been polytheists.