An all-knowing God who could simply program us for obedience instead chose to give us free will. Why? Because love without choice isn't love, it's force. God wants us to choose Him, to choose life, to choose obedience, not because we're forced to, but because we want to.