According to the Holy Qur'an, there is a great difference between 'God's will' and 'God's good pleasure'. The failure to differentiate between the two often gives rise to serious misconceptions. If a certain thing takes place in accord with the universal will of God, and thus by His sanction, that does not necessarily mean that God is pleased with it.
Nothing at all takes place in the world unless God permits it to take place, unless He makes it a part of His scheme, and unless He makes it possible for that event to take place by creating its necessary conditions. The act of stealing on the part of a thief, the act of homicide on the part of a murderer, the wrong and corruption of the wrong-doer and the corrupt, the unbelief of the unbeliever and the polytheism of the polytheist - none of these are possible without the will of God. Likewise, the faith of the believer and the piety of the pious are inconceivable without the will of God. In short, both these require the will of God. But whereas the things in the first category do not please Him, those in the second do.
Even though the will of God is oriented to ultimate good, the course of the realization of that good is paved with conflict between the forces of light and darkness, of good and evil, of what is sound and pure on the one hand and what is corrupt and defiled on the other. With larger interests in view, God has endowed man with the disposition of obedience as well as of disobedience. He has created in man Abrahamic and Mosaic as well as Nimrodic and Pharaonic potentialities. Both the pure, unadulterated human nature and the satanic urges are ingrained in man's being and have been provided with the opportunity to work themselves out by coming into conflict with each other. He has granted those species of His creatures who are possessed of authority (viz. man and jinn) the freedom to choose between good and evil. Whosoever chooses to act righteously has been given the power to do so, and the same is the case with him who chooses to be evil. People of both categories are in a position to use material resources within the framework of the broader considerations underlying God's governance of His universe. God will be pleased, however, only with those who are working for good. God likes His creatures to exercise their freedom of choice properly and commit themselves to good of their own volition.
Unlike the angels, who carry out God's commands without resistance from any quarter, the task entrusted to men is to strive to establish the way of life sanctioned by God in the face of opposition and hostility from evil-doers and rebels against Him. In the framework of His universal will, God allows even those who have chosen the path of rebellion to strive for the realization of their goals, even as He grants the believers every opportunity to strive along the path of obedience and service to God. Despite this granting of freedom and choice to all there is no doubt that God is pleased with, and guides, directs, supports and strengthens the believers alone because their overall direction is to His liking. Nevertheless, they should not expect that by His supernatural intervention God will either force those who are disinclined to believe into believing or that He will forcibly remove the satanic forces - among both men and jinn - who are resolved to spare neither their mental and physical energy nor their material resources to impede the triumph of the Truth. Those determined to strive in the cause of the Truth, and of virtue and righteousness are told that they must prove their earnest devotion by waging a fierce struggle against the devotees of falsehood. For had God wanted to use miracles to obliterate falsehood and usher in the reign of the Truth, He would not have required human beings to accomplish the task. He could have simply seen to it that no evil one remained in the world, leaving no possibility for polytheism and unbelief to exist. (Tafheemul Quran)