Mocking and Ridiculing God’s Message
[7:164] Recall that a group of them said, “Why should you preach to people whom GOD will surely annihilate or punish severely?” They answered, “Apologize to your Lord,” that they might be saved.
[7:165] When they disregarded what they were reminded of, we saved those who prohibited evil, and afflicted the wrongdoers with a terrible retribution for their wickedness.
[7:166] When they continued to defy the commandments, we said to them, “Be you despicable apes.”
[7:167] Additionally, your Lord has decreed that He will raise up against them people who will inflict severe persecution upon them, until the Day of Resurrection. Your Lord is most efficient in enforcing retribution, and He is certainly the Forgiver, Most Merciful.
[7:168] We scattered them among many communities throughout the land. Some of them were righteous, and some were less than righteous. We tested them with prosperity and hardship, that they may return.
[7:169] Subsequent to them, He substituted new generations who inherited the scripture. But they opted for the worldly life instead, saying, “We will be forgiven.” But then they continued to opt for the materials of this world. Did they not make a covenant to uphold the scripture, and not to say about GOD except the truth? Did they not study the scripture? Certainly, the abode of the Hereafter is far better for those who maintain righteousness. Do you not understand?
[7:170] Those who uphold the scripture, and observe the Contact Prayers (Salat), we never fail to recompense the pious.
[7:171] We raised the mountain above them like an umbrella, and they thought it was going to fall on them: “You shall uphold what we have given you, strongly, and remember the contents thereof, that you may be saved.”
How is 7:164 mocking and ridiculing God’s message?
It could be that these people are mocking the messenger from preaching to a group of people they deem not believers.
[6:51] And preach with this (Quran) to those who reverence the summoning before their Lord—they have none beside Him as a Lord and Master, nor an intercessor—that they may attain salvation. [6:52] And do not dismiss those who implore their Lord day and night, devoting themselves to Him alone. You are not responsible for their reckoning, nor are they responsible for your reckoning. If you dismiss them, you will be a transgressor.
Alternatively, it sounds like the messengers are preaching to them and they are mocking the messenger with sarcasm that “God will annihilate them” and the response from the messenger is to “Apologize to your Lord”