I believe remarkable God knows everything in the world(i.e what is going to happen in the future) and even He can change the future happenings.
Then why God created 'tree of the knowledge' and made them eat.
I know definitely there will be an answer for this question.
There is an idea: "emergent properties". When you program something to do a certain thing, a certain behavior emerges. There are also side effects. Certain behaviors bring out certain other behaviors. I think that when God created people with the ability of free will, the act of this kind of creation had evil as its side effect, or emergent property.
Or
if evil already existed (always was) then free will attracted it as one of the possible choices...)
So I think that it was technically people who rebelled against God (not Satan by himself - I am not sure I understand this right, but it's not that people were all cute and innocent and the evil one made them sin, it was more like that the evil was a part of these people somehow or it was attracted to them or something...
So the children of God rebelled against Him. But He expected that knowing the evil part.
He planned for them to rebel as a method of bringing out the evil out of hiding and "killing" it once and for all.
ROM 11:32 For God has bound all men over to disobedience so that he may have mercy on them all.
Like in a case where we are trying to catch a criminal. If a criminal is hiding, we can't catch him. We would then have somebody acting as bait in order to bring him out. That way, we could deal with him when he comes out and gets caught.
So God created "bait" for evil to come out of hiding and reveal itself. He planted the tree. He gave a commandment. And as Paul said in Romans 7:11 "For sin, seizing the opportunity afforded by the commandment, deceived me, and through the commandment put me to death.
God gave commandment to Adam: "do not touch" and sin in Adam was revealed and came out and caused Adam to choose to rebel. And once Adam acted (or probably even thought of doing so), sin sprang to life and killed Adam's spirit. And therefore, Adam died spiritually.
Once the spirit was dead, God had a plan to bring it back to life by having Christ die for us and live in us and when the Holy Spirit comes to live in us He makes our spirit alive (or born again) or born from God.
If the evil was not killed off through this process, we would not be able to have eternity of happiness and bliss. But God has caused sin to come out of hiding in the early stages of creation, dealt with it on the cross and through Jesus living in us, and is now able to destroy sin and death in the lake of fire.