I have not created the jinns and men but to worship Me.
56
Tafseer
'Abdullāh Ibn 'Abbās / Muḥammad al-Fīrūzabādī
تفسير : (i created the jinn and humankind only that they might worship me) to worship me; this concerns only his obedient servants; and it is also said: had allah created them for worship, they would not have disobeyed him for a blink of an eye. 'ali ibn abi talib said: i have not created them except to command them and entrust them with legal responsibility; and it is also said that this means: i created the jinn and humankind only that they might declare my divine oneness and worship me.
Jalāl al-Dīn al-Maḥallī
تفسير : and i did not create the jinn and mankind except that they may worship me: the fact that disbelievers do not worship [god] does not contradict this [statement], since a purpose does not have to be realised [in an act, for it to be valid], as when you may say: ‘i sharpened this pencil in order to write with it’, even though you might not actually write with it.