
God is love. Love is the foundation of his universe, his government. As we saw in the story of creation, He wants loving relationships with the creatures in his universe. But in order for that love to be real, the possibility has to be there that we could refuse to love back.
Otherwise we wouldn't be human; we'd be robots.
The Bible makes it clear that God wants our love, our service, our dedication of our lives to him to be a freely given choice.
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, listen to his voice, and hold fast to him. Deuteronomy 30:19-20
But if serving the LORD seems undesirable to you, then choose for yourselves this day whom you will serve, whether the gods your ancestors served beyond the Euphrates, or the gods of the Amorites, in whose land you are living. But as for me and my household, we will serve the Lord. Joshua 24:15
And with the option of choice, God opened the door to the option of evil.