We cannot know. Ecclesiastes looks squarely at the reality of life:
16 When I applied my heart to know wisdom, and to see the business that is done on earth, how neither day nor night do one’s eyes see sleep,
17 then I saw all the work of God, that man cannot find out the work that is done under the sun. However much man may toil in seeking, he will not find it out. Even though a wise man claims to know, he cannot find it out.
This is reality. Yet “the message of Ecclesiastes seems to be that the wise individual will learn how to accept such realities and live happily in the knowledge that there is someone who really does comprehend the reasons for the apparent inequities and who sovereignly controls life’s enigmatic twists and turns.” William Barrick, Ecclesiastes.
Thus in courage we can walk by sight:
4 For while we are still in this tent, we groan, being burdened-not that we would be unclothed, but that we would be further clothed, so that what is mortal may be swallowed up by life.
5 He who has prepared us for this very thing is God, who has given us the Spirit as a guarantee.
6 So we are always of good courage. We know that while we are at home in the body we are away from the Lord,
7 for we walk by faith, not by sight.
8 Yes, we are of good courage, and we would rather be away from the body and at home with the Lord.
9 So whether we are at home or away, we make it our aim to please him.
2 Cor. 5:4-9