There have been many arguments on here concerning the origin of sin, and many come from the standpoint that God created sin. I would like to refute that.
First, we must realize the attributes of God. He is loving, merciful, just, righteous, jealous, and moral. All of these attributes, the few I have listed, He is perfect in. God is perfect, and so when the Bible clearly states that God is one of these things, it means He is perfect in them.
So, let me point out one of these attributes, justice. What is justice? According to dictionary.com, justice is: the administering of deserved punishment or reward. This definition denotes punishment. What is punishment? Once again, dictionary.com describes punishment as: a penalty inflicted for an offense, fault, etc.
So, we know God is just. We know justice is a punishment for an offense or wrongdoing. Now, you may see where this is going. God's attribute denotes a wrong side of things. By being just, who He is denotes evil(or a wrong side of things).
So, we know God's character denotes evil. Does this mean he is evil? No, this doesn't. It merely makes His character assume something. You can't have cold without hot. Hotness assumes a coldness.
God did not create evil. Did he create sin? Once again, no. We know God created Lucifer and(debatable) God gave angels free will. Now we know Lucifer cannot create anything. He can only destroy or deceive(manipulation). Lucifer manipulated the assumption of evil into a physical thing: sin.
Therefore, God did not create evil. His character assumed evil, which became sin through Lucifer's manipulation.
OK, so God created us with free will. I wanna try & dissect the thinking behind this, if you'll allow me.
Firstly, the very presence of evil - where does that come from? The presence of evil offers the possibility of choice. If evil did not exist, there would be no choice.
Surely Adam & Eve had free will before they sinned. They were pefectly happy. Animals know not of sin, yet they are free to do as they please, they're not slaves, well, only to the biological demands that we too are slaves to, like eating, drinking, sleeping etc... this suggests that they already had free will.
By His omniscience God knew exactly what they would do with it when He offered them the chance to explore evil by bringing their attention to the tree of the KoGaE.
I, personally & indeed you - were not born with that choice. Apparently sin is a disease that infects us all because of Adam. We're already in the bin!
Evil is present in this realm only because it exists. It was there for for Lucifer to apprehend, then it was passed from him, onto mankind.
What you're effectively saying is that God wants us to have free will, but if we choose not to accept
His will & do as we're told, then we will spend an eternity in torment. That's not really free will in the true spirit of things now, is it?
The point is - why offer us the choice if that is the outcome? We clearly don't know what's good for us, so don't offer it to us - better still don't create it, or destroy it before it has the chance to infect us.
Seriously man, if God is omnipotent & omniscient, then surely this whole mess could easily have been avoided?