ذَٰلِكَ بِأَنَّهُمُ ٱتَّبَعُوا۟ مَآ أَسْخَطَ ٱللَّهَ وَكَرِهُوا۟ رِضْوَٰنَهُۥ فَأَحْبَطَ أَعْمَٰلَهُمْ٢٨
That is because they follow what incurs Allah’s wrath and they hate what pleases Him, so He will render their deeds worthless.
[ ↗ Study from physical print edition ]That is because they followed what angered Allah and disliked [what earns] His pleasure, so He rendered worthless their deeds.
[ ↗ Study from physical print edition ]28. That severe punishment that will occur when their souls are removed is because they followed everything that brought Allah’s wrath on them, such as disbelief, hypocrisy, opposition to Allah and His messenger, and they hated what brings them close to their Lord and draws down on them His pleasure, such as faith in Allah and following His messenger. Thus Allah nullified their deeds.
That taking of them away in the state mentioned is because they followed what angers God and because they were averse to what pleases Him that is to say they were averse to doing what pleases Him. Therefore He has made their works fail.
الشَّيْطَانُ سَوَّلَ لَهُمْ وَأَمْلَىٰ لَهُمْ (it is Satan who has tempted them and involved them in far-fetched fancies. - 47:25). In this sentence, two acts have been ascribed to the devil: - taswil [ meaning the act of decking out evil works fair to some people, and imla' meaning the act of giving respite. First, he made their evil works look good and beautiful to them, and then prolonged their false hopes which will never be fulfilled.
Tafsir al-Qurtubi [The Compendium of Legal Rulings]
تفسير القرطبي (الجامع لأحكام القرآن)قَوْلُهُ تَعَالَى: ﴿ذلِكَ﴾ أَيْ ذَلِكَ جَزَاؤُهُمْ. "بِأَنَّهُمُ اتَّبَعُوا مَا أَسْخَطَ اللَّهَ" قَالَ ابْنُ عَبَّاسٍ: هُوَ كِتْمَانُهُمْ مَا فِي التَّوْرَاةِ مِنْ نَعْتِ مُحَمَّدٍ ﷺ. وَإِنْ حُمِلَتْ عَلَى الْمُنَافِقِينَ فَهُوَ إِشَارَةٌ إِلَى مَا أَضْمَرُوا عَلَيْهِ مِنَ الْكُفْرِ. "وَكَرِهُوا رِضْوانَهُ" يَعْنِي الْإِيمَانَ. "فَأَحْبَطَ أَعْمالَهُمْ" أَيْ مَا عَمِلُوهُ مِنْ صَدَقَةٍ وَصِلَةِ رَحِمٍ وَغَيْرِ ذَلِكَ، على ما تقدم.