How man sways between Tawhid and Shirk, and between Joy and Despair, according to His Circumstances
Allah tells us that when man is in dire straits, he calls upon Allah alone with no partner or associate, then when times of ease come and they have the choice, some people associate others with Allah and worship others alongside Him.
لِيَكْفُرُواْ بِمَآ ءاتَيْنَـهُمْ
(So as to be ungrateful for the graces which We have bestowed on them.) Then Allah warns them by saying:
فَسَوْفَ تَعْلَمُونَ
(but you will come to know.) One of them said: By Allah, if a law enforcment officer were to say this to me, I would be afraid, so how about when the One Who is issuing the warning is the One Who merely says to a thing "Be!" and it is Then Allah denounces the idolators for fabricating lies and worshipping others instead of Him with no evidence or proof:
مِنَ الَّذِينَ فَرَّقُوا دِينَهُمْ وَكَانُوا شِيَعًا (Among those who split up religion and became sects - 30:32) that is, these disbelievers are those who have created a difference between Natural Faith and the true religion, or they have alienated themselves from the Natural Faith, as a result of which they are divided into different sects. شِيَعًا :Shiya'an is the plural of شِیعۃ shi` ah. A group of people following a leader is called shi ah. The fact is that the Natural Faith was based on the Oneness of Allah, by following which the entire human kind should have been one solid unit and one party. But it so happened that people split out from this unity and started following the personal views of their own leaders. Since the personal views and opinions of different people may always vary from person to person, different groups of people invented their own beliefs and religion. As a consequence, people were divided into various groups and sects, and the Shaitan made them believe that they were the only people on the right path كُلُّ حِزْبٍ بِمَا لَدَيْهِمْ فَرِحُونَ (Each group is happy with what it has before it - 30:32). That is, each group is happy and contended in its own beliefs and declare others being wrong, although they all are astray and treading the wrong path.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 32–34
The true religion is one, and it has been revealed in its perfect form to every prophet. That religion is turning towards God, fear of God, worship of God and giving one’s attention to God with all one’s heart and soul. This is the religion of nature and it eternally pervades the inner soul of man. All prophets preached this one religion, but their followers in latter generations split it into many religions. This results from the additions made by later generations to the original teachings of Prophets. Hair-splitting innovations in beliefs, new interpretations of religion with the changing times—all these things have created many religions out of one. When these additions are made people start laying more stress on them than on the original religion, due to which different groups set themselves up in opposition to each other. One group emphasizes one set of additions, while another group empasizes another set. At last a stage is reached when the followers of a single religion become divided up into many religious factions.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.