Well, there a life and an after life. Life is hard. God is lovely and caring. Why He left us to live such a hard life if there is a better after life. Why He doesn’t simply take us there?
Well- our great, great, great, great, great, great, grandparents, Adam and Eve, severly messed up- and so this universe (which God had created as Paradise), went sour. And henceforth “man, born of woman, has few days, and these are full of trouble.” This is not necessarily literally true, but a fair approximation of the general human condition.
So God Himself, in His infinite mercy, took flesh and came, as Jesus Christ, to show us the way out of this whole sorry situation, by obeying the commandments, renouncing earthly desires, etc. In fact, He Himself is the Way, the Truth the Life, The Truth that sets the soul free.
I admit, in this context, our earthly exile seems pointless, in an absolute sense, “a tale told by an idiot and signifying nothing”. But it is good to remember all our earthly sufferings are nothing compared to the glory of Heaven. Everything in this world is transitory, and so, in a sense, unreal. In Heaven, we will look back on this world as a passing trial (like remembering a painful incident from a decade ago, or a short period of being in prison). Eventually, we might even laugh about the nothingness of this world, and the nothingness of our trials, our pains, etc. Perhaps we will forget it all together, and simply exist eternally the blissful silent Nepenthe of the Beatific Vision, or even transcend existence altogether.