This is one of those questions that lives just under the surface of grief. If God knew, why bother making us at all?
The first answer: love requires freedom
A universe of robots programmed to obey would not contain love. God wanted children, not puppets. Freedom to love includes the freedom to refuse — and that freedom is precisely what made the Fall possible.
C.S. Lewis: "Free will, though it makes evil possible, is also the only thing that makes possible any love or goodness or joy worth having." A God who blocked every wrong choice would be a God who eliminated love along with sin.
The second answer: the plan was never to avoid the Fall
God's plan was not Plan A "no Fall" and Plan B "Cross." Revelation 13:8 calls Christ "the Lamb who was slain from the foundation of the world." The Cross was in God's heart before there was a world to fall.
St. Maximus the Confessor went further: he taught that the Incarnation — God becoming man — was God's eternal purpose, not a Plan B forced by sin. God always meant to unite himself to creation. Sin made the Cross necessary; love made the Incarnation inevitable.
The deeper answer: a love we could not have known otherwise
Without the Fall, we would have known God as Creator. Through the Fall and the Cross, we know him as Savior — and that is a depth of love we could not have learned any other way.
The Paschal liturgy sings (echoing an ancient hymn): "O happy fault, O necessary sin of Adam, which gained for us so great a Redeemer!" Even the worst thing becomes the occasion for the deepest love.
This is not God needing evil to do good. It is God refusing to let evil have the last word — and turning even our worst into the place where his love is most clearly shown.
The Orthodox lens
For St. Maximus and the Eastern Fathers, creation is not God's experiment that went wrong. It is God's eternal generosity. He made you knowing every detail — every fall, every fear, every season of distance — and he decided you were worth it. He decided so on a cross.
St. Isaac the Syrian: "As a handful of sand thrown into the sea, so are the sins of all flesh as compared with the mind of God." Your existence is not a regret. It is a gift the Father chose to give and the Son chose to die for.
A pastoral word
You are not a divine accident. The Father wanted you, knowing everything about you, and judged you worth a cross. That is what your existence is built on.
If you have ever wondered whether your life was a mistake, hear this clearly: it was not. You were chosen before the foundation of the world (Eph. 1:4). The world is the way it is partly because God wanted you in it.