I think the simplest way we mere mortals can understand these deep things is the following "chart":
1) With free will and free choice comes the necessary potentiality for evil choice.For an in-depth treatment, see my longer paper, from my book Christian Worldview vs. Postmodernism, and other similar papers at my Philosophy, Science, and Christianity web page.
2) The only way to absolutely avoid the evil choice altogether (even for an omnipotent being) is to eliminate all choice, and create mere robots or automatons.
3) #2 doesn't allow a free, loving relationship. It eliminates meaning and purpose, and creatures made in the image of God. It reduces human beings to animals.
4) Therefore, because of #3, God chose the option of #1, because love with the presence of evil also is better than a state of affairs with no evil but also no love and meaning among creatures.