God created the heavens and the earth for a specific purpose, in order to pay each soul for whatever it earned, without the least injustice.*
وَخَلَقَ اللَّهُ السَّمٰوٰتِ وَالأَرضَ بِالحَقِّ وَلِتُجزىٰ كُلُّ نَفسٍ بِما كَسَبَت وَهُم لا يُظلَمونَ
wa khalaqal laahus samaawaati wal arda bilhaqqi wa litujzaa kullu nafsim bimaa kasabat wa hum laa yuzlamoon
*45:22 God granted us this life as a precious chance to redeem ourselves, denounce ancient alliance with Satan, and rejoin God’s kingdom. See Introduction and Appendix 7.