I tend to believe that the reason God created His world in statu viae, in a “state of journeying to perfection”, is so that we humans, as a high point of His creation, could participate in obtaining our own justice, in achieving our own perfection, because to the degree that we will it, we are that much more just. And willing it means to engage in a struggle, in a world where good and evil are both experienced- or literally known-before we have the direct experience or immediate vision of the ultimate Good, God Himself.
Adam wanted to experiment with attractions other than God, to see if those things, pursued apart from God and according to Adam’s own will, might fulfill or cause the greatest amount of happiness possible within himself. We’re still here experimenting, carrying on the family tradition, without even the benefit of meeting God in the way Adam knew Him to begin with, grasping and seeking and fighting for the knowledge of God if we’re willing, aided by His revelation and grace. We’re here to find out if we want God to begin with, or if, instead, we prefer ourselves to God, like Adam did according to Church teaching.
This is a process, of coming to believe, and then coming to know and trust God increasingly more, and so coming to love Him, eventually with our whole heart, soul, mind, and strength. This is what our justice consists of; this is what our perfection consists of. And part of that process is to know, and become jaded by, evil/sin, so that we might develop a hunger and thirst for righteousness, so that we might hope for and pursue and find and run to the Good, Himself, even as we require His help in finding Him, even as, in another sense, we just allow ourselves to be found by Him.
1732 As long as freedom has not bound itself definitively to its ultimate good which is God, there is the possibility of choosing between good and evil, and thus of growing in perfection or of failing and sinning. This freedom characterizes properly human acts. It is the basis of praise or blame, merit or reproach.
409 This dramatic situation of "the whole world [which] is in the power of the evil one"makes man’s life a battle:
The whole of man’s history has been the story of dour combat with the powers of evil, stretching, so our Lord tells us, from the very dawn of history until the last day. Finding himself in the midst of the battlefield man has to struggle to do what is right, and it is at great cost to himself, and aided by God’s grace, that he succeeds in achieving his own inner integrity.