Allah has created humankind for the sole purpose of Ibadah, meaning humankind has been bound by the Creator to live a life in this world in such way that he does what Allah has decreed for him and abstains from what He has admonished. Allah has created the whole world and the whole universe for the purpose of testing the humankind that he chooses good deeds and lives his life saving himself from the bad deeds.
Now, this proposition that humankind has to live a pious life barring him from the evil is self-evident. Humankind can see his own self – the soul that resides in every person that the good deeds are good and the self of the humankind accepts this while the bad deeds are lamented by the soul or the self-condemns them.
In a way we can say that we have a small ‘court’ in ourselves, which is inherent in our beings and that has been fashioned thus that we can differentiate between good and bad or right and wrong.
When Allah has planned that humankind has been created by Him for getting ‘eternity’, which means in heaven he wants each person to be good and righteous and that we identify Him.
The concept of Tawheed (one Allah) has also been instilled in humankind by Allah Himself and is analogous to doing righteousness. To guide people towards Tawheed and towards righteous deeds Allah had sent His messengers in this world who told people to leave all the evil doings and become faithful and righteous so that they are not lost in this world unguided and that on resurrection they get the rewards of the good deeds they did in this world .
One argues that if all people were meant to identify ‘one’ Allah why did Allah let them born in families which are not Tawheed adherent.
We should be clear that a person born in a Muslim family is not guaranteed to attain eternity. He may be a person with a name like a Muslim but in his heart he does not believe in Allah and does not do righteous deeds and does oppression.
While a person born in a non-muslim family, by reasoning and paying attention to the signs of Allah may accept Islam and start leading a pious life, all the while strengthening his faith.
Also Allah has placed his signs (Ayahs) in this whole world that people who does not live blindfolded by looking and observing his very surrounding- the nature, his own self, plants and animals and the way all the life and creation is being run: the very perfect and wise management with which the whole world is being run: how a baby is born from blood how he is shaped and how he is perfected into a complete person, how a seed is ruptured and a whole plant grows from it, how water vapor forms clouds and thus rain occurs and a dry land turns moist and a base for whole plantation.
This concept of Tawheed or belief in one Allah leads us to the concept of Akhirah, which means that there will come one day when all the life in its whole form and all that exists in this world will come to the end. Then Allah will take account of the life that He had given to humankind in this world. Then those who would have led this life as Allah has ordained for him will be rewarded in the form of Jannah – heaven where will be all the bestowments that a humankind would ever want. While on the other hand those who would have lived this life ignoring Allah and what he had commanded will face punishment in the form of Jahannam, where they will be severest punishment. It is to be noted that Allah will do justice on the judgement day meaning the rewards as well as the punishment that one would be getting will be truly justified, so based on justice.
Read more about the Importance of Seeking Knowledge in Islam here.