Good question....The greatest purpose of afterlife is that Allah's Justice will be served to all creation including the orphans, the poor, the oppressed, the animals, the earth, the murdered everything!!! That is why the afterlife is given names like Yamul Deen (Day of Reckoning) Yamul Hisab (day of accounting), Al Haqqah (The realty) of what happened in our temporary stay in this life. That is why it That is scary and makes us give others their due RIGHTS. The other purpose is for God to show His ultimate mercy to His chosen believers. All that can be explained by just reading Surah at-Tin (95).
The afterlife is:
(1) Eternal, hard to imagine living for 70 trillion years and still living!!! Makes us think about the ratio of this life compared to afterlife ~80 yrs. < 800000+ yrs Keep adding zeros
(2) There are only extremes meaning heaven and hell. Living in extreme pain or extreme joy. Those who did not commit shirk (associate partners with God) will live in hell for limited time.
(3) We eat, drink what we want. That could be your pupose for 20 trillion years because you personally enjoy it so much. The foods there are not like here. It is infinitely better.
(4) We meet people and interact with them. There is no lying, backbiting, cheating, stealing etc.
(5) Most importantly we get to see our Creator every Friday.