What was God's purpose in creating the "tree of Good and Evil"?

I have a question hanging in my mind..well, several really. God. He created us so that he could have companionship with us, but allowed temptation that would cause us to become unacceptable to him. Why did he even introduce something that would cause us separation from him? God knows everything, before and after…he... show more I have a question hanging in my mind..well, several really. God. He created us so that he could have companionship with us, but allowed temptation that would cause us to become unacceptable to him. Why did he even introduce something that would cause us separation from him? God knows everything, before and after…he knew we were going to mess up in the first place, so why would he even bother? Secondly, God is the same today as he was back in the day (old testament) and will be the same in the future…why did he command Joshua to go out and kill a whole group of people…men ,women and children, animal. God hates sin. Then why did he tell us to kill people? He told us in the 10 commandments not to kill…I’m feeling lost now in the idea that God created us, knowing we would mess it up and then in the fear of being doomed to eternity in Hell…we are given a choice to follow him or burn forever. I need clarity.
23 answers 23