Exodus 4:21 reads:
The Lord said to Moses, “When you return to Egypt, see that you perform before Pharaoh all the wonders I have given you the power to do. But I will harden his heart so that he will not let the people go. NIV
Are we told in Exodus why God would send Moses to free the Israelites, and yet harden the Pharaoh's heart so he would refuse, just to then unleash his punishment on him and his people?