Since nothing is impossible for God, we should suppose that it would have been possible to create creatures which were not capable of sin. Yet both the angels and mankind sinned. Some theologians have said that God wanted to create beings with a free will so that our love for Him would be genuine love, since love must be a choice; but that the unavoidable consequence of a free will is the ability to choose sin. I think there's some truth to this, but we ought to remember that when our Lord returns to redeem His creation we will be perfected and will sin no more, ever. Yet in that state we won't lose our free will, and we won't be incapable of loving God. So we might wonder why God didn't create us in that perfected state from the very beginning?
In the beginning when God created Adam and Eve, He put that tree of knowledge in the garden and told them not to eat of it. If He knew that they would disobey, (and He certainly did), then why did He even set up this situation for Adam and Eve? We should first note that God did not tempt Adam and Eve. God never tempts anyone, but temptation occurs in the hearts and minds of the one being tempted. (James 1:13-14). But God could have intervened and stopped the whole exchange between the serpent and Eve before anyone could sin. Why didn't He? The Bible does give a few reasons, though it acknowledges that it may be hard for us to understand...
Oh, the depth of the riches and wisdom and knowledge of God! How unsearchable are his judgments and how inscrutable his ways! For who has known the mind of the Lord, or who has been his counselor? (Romans 11:33-34)
This comes immediately after saying “For God has consigned all to disobedience, that he may have mercy on all.” One of the main reasons seems to be that in the midst of an evil world, the attributes of God shine through. The Bible says:
By this we know love, that he laid down his life for us, and we ought to lay down our lives for the brothers. (1 John 3:16)
It's not merely that God wanted us to express genuine love toward Him, but that He wanted to express His divine love toward us! In saving mankind from our fallen state, God shows His love toward us in a way that would not otherwise have been possible. Since God would have expressed love towards sinless creatures, we would never have understood the true depths of God's love. For we see a far greater love in that “while we were still sinners, Christ died for us.” (Romans 5:8). Jesus said; “Love your enemies and pray for those who persecute you ... For if you love those who love you, what reward do you have?” (Matthew 5:44,46). Love for one's enemies is a far greater love – the love of God is revealed in that He loved us while we were His enemies. “By this we know love...” (1 John 3:16 [above]). Again, Paul says:
even when we were dead in our trespasses, [God] made us alive together with Christ ... so that in the coming ages he might show the immeasurable riches of his grace in kindness toward us in Christ Jesus. (Ephesians 2:5-7)
In Luke's gospel, Jesus sits in the home of a Pharisee; one who thought himself to be righteous. And then a woman comes to Jesus who is simply described as “a sinner”, and she worships Him. Jesus observes the difference between the Pharisee and the woman...
Then turning toward the woman he said to Simon [the Pharisee], “Do you see this woman? I entered your house; you gave me no water for my feet, but she has wet my feet with her tears and wiped them with her hair. You gave me no kiss, but from the time I came in she has not ceased to kiss my feet. You did not anoint my head with oil, but she has anointed my feet with ointment. Therefore I tell you, her sins, which are many, are forgiven—for she loved much. But he who is forgiven little, loves little.” (Luke 7:44-47)
You see the point being made here – the Pharisee who thought himself righteous did not love Jesus to the great degree and depth of this woman who was a sinner and had truly understood the love of Christ for her. We might say that without sin in our lives we would not come to such a deep understanding of God's love. Not that this means we should sin all the more... If redemption from our sins teaches us of God’s love, righteousness will be the result of having learned of God’s love.
So, as we read yesterday, “God made man upright, but they have sought out many schemes.” (Ecclesiastes 7:29). If God created man with the ability to “scheme”, it seems to be for this greater purpose... that by living a life in rebellion against God for a time, we would learn a great deal about our need for God, about just how glorious God is, and about God's infinite love. Would we have understood this apart from the cross? We do have a hint in Scripture that we probably wouldn't, since Lucifer, when he was created, soon thought that he could be equal with God. He clearly hadn't understood the power and majesty of God; but even the angels learn about God by watching God's plan of redemption unfold:
For I think that God has exhibited us apostles as last of all, like men sentenced to death, because we have become a spectacle to the world, to angels, and to men. (1 Corinthians 4:9)
Now when we consider all the souls that die in their sins and go to hell, we might see this as a cost associated with the message of God's love, and wonder whether it was worth it? But this is not a cost that God is responsible for – we are. God said to Israel (as well as to us also)...
Cast away from you all the transgressions that you have committed, and make yourselves a new heart and a new spirit! Why will you die, O house of Israel? For I have no pleasure in the death of anyone, declares the Lord GOD; so turn, and live. (Ezekiel 18:31-32)