Imam Ghazali mentions the following regarding the duty of amr bi’l ma‘rūf wa nahi ‘anil munkar in his magnum opus, Iḥyā’ ‘ulūm al-dīn (‘The Revival of the Religious Sciences’):

“Enjoining good and forbidding evil is the greatest pillar of the dīn, and it is the mission for which Allah sent all the prophets. Had its enactment been suspended and its knowledge and action disregarded, prophethood would have become dysfunctional, religion would have disappeared, slackness prevailed, misguidance spread, ignorance common, whole lands come to ruin and the people perished, but they would not have realised their destruction except on the Day of Judgment.

That which we feared did indeed take place; to Allah we belong and to Him we shall return. The reason for this is that the knowledge and application of this pillar has withered away, and its reality and form erased. The hearts, therefore, have been overcome by hypocrisy to people, while no longer being watchful of the Creator.

The people have indulged in their whims and lusts like animals. It is rare to find on the surface of the earth a true believer who is fearless for the sake of Allah. Whoever takes initiative to avoid such slackness and bridges the gap by pledging to performing it or taking the responsibility to implement it, thus renewing this extinct Prophetic Sunnah, carrying its burdens, rolling up his sleeves to revive it – then he alone among the created beings has revived a Sunnah that time conspired to kill, and only he has exclusively obtained an act of devotion before which all other devotional acts fall short of reaching its summit.”

[Cf. Mustafa Abu Sway, A Treasury of Al-Ghazali, Kube, Markfield, 2017, pp. 54-55]