Allahs' Purpose of Creation
Allah Created Us to Live Happily Forever; He prepared Us for Such Happiness
Be informed that Allah created mankind to live forever happily. Life in the Hereafter has no end. Allah has made the life in this world like a farm wherein one plants something in order to reap its fruit in the Hereafter, basing the reward in the life to come on the deeds in this life. The servants of Allah prepare themselves for such an eternal life through their deeds in this life. 
Undoubtedly, had such a short-lived life-span, such a short time to live, been spent with adoration to the extent that Allah is not disobeyed even for a twinkling of an eye, nor is one breath spent except in obedience to Allah, it still by necessity and commonsense falls short of qualifying for such rewards. Therefore, it is by virtue of the dictates of the Divine kindness and mercy that Allah opens for His servants the gates of His generosity, thus qualifying them to be rewarded with what has no end nor diminution; each and every blessing starts from Him; each and every act of His kindness is out of His own favor.
The first manifestation of His generosity and kindness to His servants is that He does not terminate the outcomes of their deeds when their life-spans terminate. Rather, He has made such life-spans equivalent to the duration of life itself, measured by the days they are acted upon and by those who put them to action. He did so by making one of His injunctions is that if someone starts a tradition wherein there is guidance for people, he will receive its rewards as well as the rewards of all those who implement it till the Day of Judgment. Likewise, if anyone initiates an evil tradition, he will bear its sin as well as the sins of all those who act upon it till the Day of Judgment (Waram Collection, Vol. 2, p. 236).
He also makes one of His injunctions letting parents share in the good deeds done by their offspring by virtue of the parents being the reason for the existence of the offspring, and this chain of offspring is endless.
He also made the rewards of some good deeds the creation, out of them, of angels who worship Him till the Day of Judgment, assigning the rewards of such worship to the person who performed such good deeds. Also, He opened a gate from which His mercy descends upon them, considering the rewards of a nightâ€™s good deeds equivalent to those of one thousand months: Allah, the most Praised One, has told us: â€˜The Night of Destiny (Lailatul-Qadr) is better than a thousand months.â€™
He also has regarded one hourâ€™s contemplation equivalent to sixty years of adoration (Bihar al-Anwar, Vol. 17, p. 327 where the reward is recorded as equivalent to one year) according to some narratives. 
He made the nightâ€™s stay at the shrine of the Commander of the Faithful (â€˜a) equivalent to seven hundred yearsâ€™ adoration.
He made taking care of a believerâ€™s need equivalent to the adoration of nine thousand years during which one spends the day fasting and the night praying (Bihar al-Anwar, Vol. 74, p. 315).
He made the fast of three days a month equivalent to fasting for eternity.