“You seem to be asking why he created us with free will and the short answer is because He chose to make a creation that could also choose. That whole “in his image” thing.”
Wwll,one would have to say he failed miserably in making us in his image - he’s the epitome of perfection, we’re anything but.
We’re kinda the Yugo of life.
“He didn’t make things that way, that’s the way things are.”
Woah! Did he not create everything according to Genesis?
No God created the universe we occupy. But God did not create himself. He is the Great I Am. Without beginning or end and unchanging.
Which is why the bible schools us on questioning God’s purpose or intent.
God tells us His original creation was “good” and we broke it by choosing disobedience. I’m not going to argue with Him over it.
As for how humans are made in the “image of God”... that seems to be in that we have both free will and creative/imaginative capabilities which other created beings like angels don’t have or no longer have.