The brother who asked this question – and whoever wants to know the truth – should realize that the purpose behind the creation of man and the creation of heaven and earth, is that Allah, may He be glorified and exalted, may be known and that His Oneness (Tawheed) may be affirmed and that He may be obeyed.
Allah says (interpretation of the meaning):
“And I (Allah) created not the jinn and mankind except that they should worship Me (Alone)”
[al-Zhaariyaat 51:56].
Ibn Katheer (may Allah have mercy on him) said:
i.e., I have only created them so that I might command them to worship Me, not because I am in need of them.
Ali ibn Abi Talhah said, narrating from Ibn Abbaas: “except that they should worship Me (Alone)” means: except that they should affirm their servitude to Me, willingly or unwillingly.
This was the view favoured by Ibn Jareer.
Tafseer Ibn Katheer (4/239).
Many people are confused about what is wanted from the slaves of Allaah, which is adhering to His religion which He has chosen for them, and what is wanted for them, which is rewarding the obedient and punishing the disobedient. This is part of Allaah’s decree which will never be altered or changed.
Ibn al-Qayyim (may Allaah have mercy on him) said:
As for the truth which is the purpose for which He created them – i.e., the heavens and the earth and everything in between them – it is a twofold aim: what is wanted from His slaves and what is wanted for them.
What He wants from them: is that they should know Allaah and the attributes of His perfection, may He be glorified and exalted, and they should worship Him alone and not associate anything with Him, so He alone will be their God, the One Whom they worship and obey and love. Allaah says (interpretation of the meaning):
“It is Allah Who has created seven heavens and of the earth the like thereof (i.e. seven). His Command descends between them (heavens and earth), that you may know that Allaah has power over all things, and that Allah surrounds all things in (His) Knowledge”
[al-Talaaq 65:12].
He told us that he created the universe so that His slaves might know the perfection of His power, the all-encompassing nature of His knowledge, which requires knowing Him and His names and attributes, and affirming His oneness.
Allah says (interpretation of the meaning):
And I (Allaah) created not the jinn and mankind except that they should worship Me (Alone)”
[al-Zhaariyaat 51:56].
This purpose is what is wanted from His slaves, which is that they should know their Lord and worship Him alone.
As for what is wanted for them, it is recompense on the basis of justice and divine grace, reward and punishment. Allah says (interpretation of the meaning):
And to Allah belongs all that is in the heavens and all that is in the earth, that He may requite those who do evil with that which they have done (i.e. punish them in Hell), and reward those who do good, with what is best (i.e. Paradise)
[al-Najm 5 :31]
Verily, the Hour is coming __ and I am almost hiding it so that every person may be rewarded for that which he strives
[Ta-Ha 20:15]
In order that He may make manifest to them the truth of that wherein they differ, and that those who disbelieved (in Resurrection, and in the Oneness of Allah) may know that they were liars
[al-Nahl 16:39]
Surely, your Lord is Allaah Who created the heavens and the earth in six stages and then rose over (Istawa) the Throne (really in a manner that suits His Majesty), disposing the affair of all things. No intercessor (can plead with Him) except after His Leave. That is Allaah, your Lord; so worship Him (Alone). Then, will you not remember?