One of the great struggles we have with the God revealed in Scripture has to do with texts that say, “God never changes,” and other texts that seem to say things like, “God changed his mind,” or “God regretted…”
For instance —
Malachi 3:6 – “For I the LORD do not change; therefore you, O children of Jacob, are not consumed.
Genesis 6:7 – “So the LORD said, “I will blot out man whom I have created from the face of the land, man and animals and creeping things and birds of the heavens, for I am sorry that I have made them.”
1 Samuel 15:11, 35 — “I regret that I have made Saul king, for he has turned back from following me and has not performed my commandments… 35 And Samuel did not see Saul again until the day of his death, but Samuel grieved over Saul. And the Lord regretted that he had made Saul king over Israel.
See also Exodus 32:14, Jer. 26:13, 19, and Jonah 3:10, 4:1-2 as further examples of this language.
Two Important Questions…
First, How can a God who says he never changes turn around and change his mind or actions (or both) toward someone?
And second, why does God do some things (like create the human race, or choose Saul to be the King) if he knows that they will fail?
These are two really big questions (perhaps too big for a blog-post, but we have to start somewhere)!
First Question – A changeless God who changes his mind?
The short answer to the first question is that God does (insofar as people understand it and experience it) seem change his mind on some things, but that is only because God never changes his mind on others. In order to think about this more, consider this reflection in Kaiser, Davids, Bruce, and Brauch’s excellent book, Hard Sayings of the Bible.
[This] text (1 Sam. 15) affirms that God changed his actions toward Saul in order to remain true to his own character or essence. Repentance in God is not, as it is in us, an evidence of indecisiveness. It is rather a change in his method of responding to another person based on some change in the other individual. The change, then, was in Saul. The problem was with Saul’s partial obedience, his wayward heart and covetousness.
To assert that God is unchanging does not mean he cannot experience regret, grief and repentance. If unchangeableness meant transcendent detachment from people and events, God would pay an awful price for immutability. Instead, God enters into a relationship with mortal beings that demonstrates his willingness to respond to each person’s action within the ethical sphere of their obedience to his will. 
The point here is that God’s essential nature and his ultimate commitment to his own sovereign will does not change. When God engages in relationship and interaction with a volitional person (such as King Saul) or a People (such as Israel), he remains true to his own “God-ness” and his ultimate purposes. In cases where the person or people with whom God is partnering decide they don’t want to do things along the lines of God’s will, God remains true to himself, which will mean that they will feel and experience every indication that they and God are not on the same page.
In the case of the first couple, it was God’s intention to work through them to project his image into the creation, and to expand his dominion over all of the creation through them. When they decided to be autonomous, God remained true to his ultimate commitment (cf. Gen 3:15) while “changing the plan” with this particular couple. Thus, the first couple is ushered out of the program, and God himself engages in the process of restoring what people ruin. This exact pattern can be seen over and over again in the Old Testament narrative. God never changes his ultimate purposes, and God never changes in his goodness and his “God-ness.” Thus, he can be said to change his mind, or regret, or change his actions toward people on various occasions as a way of illustrating (and ultimately remaining true to) his own unchanging nature.
That’s why I titled this post, “God sometimes changes his mind, but only because he never changes.” If you go back and read the texts where this happens, you will see that every time, it is because God’s covenant partner refuses to function within the parameters of God’s purposes and God’s nature.
The question (and conclusions) in light of Biblical theology —
I want to do a bit more to root this theological idea in a framework of Biblical theology.
Ultimately, the larger story of scripture resolves with Jesus opting to function completely on God’s terms to the point of death, and with God vindicating Jesus through resurrection as the affirmation that Jesus is the one person who was wholly faithful to God.
Jesus remains true to God, and God remains true to Jesus, and in the end – God hands the entire creation over to him (cf. Mat. 28:18), which is exactly what God said he would do in Genesis 3:15.
God’s ultimate aim to hand the world over to an image-bearing human who reflects his image back into the creation, and who rules on his behalf never changed, though the people who were a part of the long-term project along the way did change (cf. Phil. 2:8-11).
Second Question – Why did God do ‘that’ if he knew what would happen?
The larger question behind any single example of people failing to carry out God’s purposes is — “Why would God create the world in the first place if he knew that evil would enter the world, people would sin, and terrible things would happen?”
In order to be intellectually honest, we have to admit that creating the world as God did was not his only option. After all, He’s God and he can do as he will do. But sticking with the first theological conclusion that God remains true to his own nature actually helps inform a solid (and more biblical) answer to this perplexing theological question.
Consider this take on it from Norman Geisler’s Baker Encyclopedia of Christian Apologetics as a good place to start…
A free world where no one sins or even a free world where everyone sins and then gets saved is conceivable but it may not be achievable. As long as everyone is really free, it is always possible that someone will refuse to do the good. Of course, God could force everyone to do good, but then they would not be free. Forced freedom is not freedom at all. Since God is love, he cannot force himself on anyone against their will. Forced love is not love; it is rape. And God is not a divine rapist. Love must work persuasively but not coercively. Hence, in every conceivable free world someone would choose to do evil, so a perfect evil-free world may not be possible.
A world where sin never materializes is conceivable but it may not be the most desirable morally. If evil is not permitted, then it can not be defeated. Like automobiles, a tested world is better than an untested one. Or, to put it another way, no boxer can beat an opponent without getting into the ring. God may have permitted evil in order to defeat it. If evil is not allowed, then the higher virtues cannot be attained. No pain, no gain. Tribulation works patience. There is no way to experience the joy of forgiveness without allowing the fall into sin. So, a world where evil is not defeated and the higher goods attained would not be the best world achievable. Therefore, while a world where sin does not occur is theoretically conceivable, it would be morally inferior. 
A provocative conclusion —
Some people may think they would prefer it if God had never created the world in the first place. Why risk the possibility of evil?
Others may wish that God had not created people with the freedom to sin rather than to love and obey him. Why risk the possibility of rebellion?
Still others may wish that God would simply rid the world of all the evil people so that only the good ones who never go against God’s will are left. Why let bad people live among all the good ones who (uhem) always only do things the way God wants them done?
In any of these idealized cases, such preferences negate the possibility of the “wisher’s” own existence.
I’ll stop here (for now) though there is more to be discussed, but let’s pick it up in the comments below. Jump in!
 Kaiser, W. C., Jr., Davids, P. H., Bruce, F. F., & Brauch, M. T. (1996). Hard sayings of the Bible (p. 209). Downers Grove, IL: InterVarsity.
 Geisler, N. L. (1999). Article: The Avoidability of Evil In Baker encyclopedia of Christian apologetics. Grand Rapids, MI: Baker Books.