Instead of putting the tree of doom in the middle of the garden, and knowing that humanity is going to eat its fruit (all knowing god and all that), why didn't he just... not put it there in the first place?
Billions of lives are now in Hell because God wanted to give us a test he knew we would fail. 
I agree.
Which is why I think he put it there to see when we were ready to leave the nest, as it where.
Humans weren't kept as servants nor as pets. Humans were supposed to be God's attempt to make something equal. (His children?)
Now, for us to become more than simple animals, we had to do things on our own. This is akin to babies. A baby is incapable of washing itself, feeding itself, even walking by itself. This was Humans in the Garden of Eden: God provided everything because we couldn't provide for ourselves.
Once we were capable of making our own choices, only then were we ready to venture out into the real world and provide for ourselves: to make choices for our own survival as it where.
Now, to avoid any psychological issues of abandonment, God created "sin". It's a way to say "You made your dad very angry by being bad now get out of my house!" without making them think that you hate them.
Had God NOT created sin, Adam and Eve would not know what they did to be kicked out of the Garden and thus may not have developed the skills needed to survive. Skills like hunting, fishing, harvesting, farming, building shelters, etc...
Granted, Adam and Eve prayed and fasted for years to get forgiveness, but in the end they had children who learned how to survive. And thus Human Civilization was born.