The reason we exist at all is because God is a relational being. This is indicated by the trinity itself. We exist because God wanted to love us, he wanted us to love him and he wanted us to love one another. If I understand correctly, this is why the very universe itself exists. It is about love. But love gives a choice. By definition, love cannot be forced or demanded. Love requires freedom, so God gave us free will. He gave us the opportunity to love him or to not love him–to obey him or not to obey him. Deuteronomy 30:19. “This day I call the heavens and the earth as witnesses against you that I have set before you life and death, blessings and curses. Now choose life, so that you and your children may live, and that you may love the LORD your God, obey Him, and hold fast to Him. For He is your life, and He will prolong your life in the land that the LORD swore to give to your fathers, to Abraham, Isaac, and Jacob.” We can understand this by considering parents. Why do we bring children into the world? Because we want to love them and for them to love us, yet we give them freedom. Parents who totally control their children are not acting in love. Being a parent is a risky business, as we risk their dying and we risk their destroying their lives with sin and bad choices.
Of course, there is one big difference between the parent analogy and God’s love for his created children, and your question brings out this very big difference. This difference is God’s foreknowledge. If I understand God correctly, he foreknows without predestining. God knows who will choose him. In light of that, why did he create us, knowing that so many of us would rebel against him? This is a good and a difficult question. As a human being, I cannot understand a universe in which foreknowledge exists. I cannot understand God. This is a mystery to me. But, this is what I know. God created us so that we could have a relationship with him and with one another, yet our rebellion messes up God’s intention for us. It is about God’s love, but also his holiness and his justice.
That is my answer.