#Why did Yahweh harden the hearts of Pharaoh and his servants?

Yahweh hardened the hearts of Pharaoh and his servants to show these signs of his power among them. He also did this so that the Israelites might tell their children and grandchildren the things he has done. [10:1-2]