God cannot lie. (Titus 1:2)
However, He creates people who can and do lie. . . .
God is perfect. (Psalm 18:30, Deut. 32:4, Mat. 5:48)
He has created a world (which is not)--with creatures (who are not) . . . perfect. . . .
God is holy. (Rev. 15:4)
The term "qodesh" means holy in Hebrew, and it describes God. It has the connotation of being uniquely set apart, distinct, one-of-a-kind. "To say that God is holy is to say that He is eternally separate and distinct from all impurity." (Dr. Bruce Ware, Bible scholar/author)
God is good. (Luke 18:19)
What is "good"? It is what God is. He is THE standard for what is good. HE determines, by His very character, essence, and as He decrees it, what is "good."
There are many examples like the above to make the point . . . which are seen by the Spirit of Truth (those without the eyes to see it cannot "see" it) . . . that while God is perfect, holy, truthful, good etc., He has created a world and creatures . . . which are not.
This presents a conundrum, it would seem, and is indeed one of the great, historical philosophical and spiritual dilemma's to comprehend for students of truth and seekers alike.
Straightaway, according to His own Word, we can say this: It MUST be good, just, perfect, holy, etc., that "bad" or "evil" has entered into creation.
It cannot have been an accident, for we know that God is omnipotent. It cannot have been a surprise, for we know that God is omniscient. And it cannot have somehow crept it from the outside of God's purview, for we are Told that He is omnipresent!
We are left to deduce that God MUST have a perfect, good, holy, even LOVING purpose (for God is love) in allowing evil to corrupt His creation.
One thing to keep in mind while considering this matter, is to realize that evil does not have existence in and of itself. It is not a thing. It is, rather a LACK of something--of God's perfection, of God's holiness. Evil is a privation, a parasite. It is a deterioration, a perversion of the good thing. For instance, a wound on the body. The wound cannot exist without the body first being there.
I believe a big clue to understanding better this conundrum . . . is found in Genesis 1:31: "God saw all that He had made, and behold, it was very good."
Notice, God, Who is perfect Himself . . . made a creation which was "very good". He did not say it was "perfect". Right there we see that distinction between the holiness (divine, perfect separateness) of God Himself . . . versus creation . . . which is but "very good."
(More on this, as I can . . . in a bit.....)