Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God?
Epicurus
God gave us free will.
It means that we have capacity to do good or evil.
If God prevent us to do something, he block our free will and freedom.
Without our freedom we will be just like robots and God don't want it.
So, God have no choice but to allow both good and evil in this world, so that people can learn from their suffering and return to him, like in the story of ''Prodigal son'' in the Bible.
hm, aren't the 10 commandments like do's and don't? Like you program a machine to do? hm... Also, I cannot believe how stupid you sound.. It's very,very easy to do that for every new god I can imagine now. here, I'll show you.
The only true God is Krimwer, he gave us free will to do evil and good in our eyes as long as we consider that to be the true way or as long as we believe in those things we do, evil or not. Also, he has created the first human, he gave the chimpanzee the magic water to drink and it developed stronger mind and magically stood up, transformed. Krimwer, the God, is also beyond our seeing spectre or any other technology that we have, so we can't see him or with any tech that we have but he's there. Also, he's has spoken to me, through my mind and told me all of this, so I've written it down and that is the first chapter in the holy book, he will call me later to tell me more.
So what makes your religion more legit than this one I've just made up right now?