Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:7:166

So when they were insolent about that which they had been forbidden, We said to them, "Be apes, despised."  

And when they disdained, to desist from, that which was prohibited to them, We said to them, ‘Be apes, despised!’, abased, and they became so: this is an explication of what preceded ˹with regard to the details of their ‘grievous chastisement’˺. Ibn ‘Abbās said, ‘I do not know what befell the group that abstained’. ‘Ikrima said, ‘That group was not destroyed because they had been averse to what the others did and had said, ‘Why do you preach (admonition) …’ Al-Hākim reported ˹in a hadīth˺ that he ˹‘Ikrima˺ referred this opinion to Ibn ‘Abbās, who was delighted by it.
القرآن:٧:١٦٦

فَلَمَّا عَتَوْا عَنْ مَا نُهُوا عَنْهُ قُلْنَا لَهُمْ كُونُوا قِرَدَةً خَاسِئِينَ  

{فلما عَتَوا} تكبروا {عن} ترك {ما نهوا عنه قلنا لهم كونوا قردة خاسئين} صاغرين فكانوها، وهذا تفصيل لما قبله، قال ابن عباس: ما أدري ما فعل بالفرقة الساكنة وقال عكرمة: لم تهلك لأنها كرهت ما فعلوه، وقالت: لم تعظون إلخ، وروى الحاكم عن ابن عباس: أنه رجع إليه وأعجبه.