تَدْعُونَنِى لِأَكْفُرَ بِٱللَّهِ وَأُشْرِكَ بِهِۦ مَا لَيْسَ لِى بِهِۦ عِلْمٌ وَأَنَا۠ أَدْعُوكُمْ إِلَى ٱلْعَزِيزِ ٱلْغَفَّـٰرِ Qur’an Ghafir (40:42)TadAAoonanee liakfura bi A ll a hi waoshrika bihi m a laysa lee bihi AAilmun waan a adAAookum il a alAAazeezi alghaff a r i
I.e., because there is no reality whatsoever in those supposedly "divine" beings or forces (Zamakhshari).
The worship of Pharaoh was blasphemy, but it had many sides, including the worship of heroes, animals, powers of good and evil in nature, and idols of all kinds. It is this comprehensive cult which required warnings again and again, but Allah is Exalted in Power, and gives such forgiveness on repentance.