How can things NOT go as God plans? He is all-powerful and all-knowing. If He knows what will happen, and cannot be wrong, how can His plan go awry?
Exactly. And sin is part of God's plan.