The second view is that all of them were created for this worship, yet only some of them performed it.
Those who hold this view fall into two groups.
One group says that Allah willed nothing but worship, but they did what He did not will, independently of His power and will. These are the Qadariyyah, who deny the all-encompassing nature of His power, will, and creation.
The second group says: Rather, everything that occurs does so by His will, power, and creation. Yet He loves only the worship for which He created them, and commands only that. Some He aided, and they fulfilled His command; others did not fulfill it.
According to them, the particle lām (“so that”) functions as it does in His words:
“so that you may complete the prescribed period and glorify Allah for guiding you, and so that you may be grateful.”
And in His words:
“For every community We have appointed a rite of sacrifice, so that they may mention Allah’s name over the livestock He has provided for them. Your God is One God, so submit to Him, and give good tidings to the humble.”
And in the words of Allah Most High:
“Worship your Lord, who created you and those before you, so that you may become mindful of Him.”
This is according to the majority view, which takes la‘alla (“so that you may”) as relating to His words “created you,” just as He says:
“And I did not create the jinn and mankind except to worship Me.”