Man is not created in vain; there is a definite purpose in creation. The purpose is elaborately explained in Holy Verses, wherein Allah (SwT) asks a searching question:
‘’Do you think We created you in vain, and that to Us you will not be returned’’? (23:115)
The Holy Verse is meant to impart a feeling that the time the man inhibits in the mortal world is very short compared to the long time period in the hereafter, as is expounded in what precedes in the three Ayahs.
‘’They will be asked, How many years did you remain on earth. They will say, we remained for a day or a part of the day. They will be told, you remained only for a little while, if you only knew’’ (23: 112,113,114)
On being questioned, ‘’Do you remember how much time did you spent on earth’’ they will reply, we have spent a day there or even a part of the day’’ it implies that their level of consciousness and sense of timing would have gone such a change that they will feel at a loss to furnish the right answer. It is only then they will be told that, ‘’the time that you have spent there indeed is very short compared to the life that you have to live here.’’ It is taken to imply that if only it would dawn that the life to be lived in hereafter is long, the man might strive to improve his lot in the mortal world, in order to find comfort in hereafter.
We may now dwell in what the Ayah (23:115) implies. It implies accountability for our deeds, as creation is a purposeful exercise. Man is not created in vain; he has to fulfil the deed ordained.