Why God was hardening Pharoah's heart?
1Co 1:26 For ye see your calling, brethren, how that not many wise men after the flesh, not many mighty, not many noble, are called.
Exo 9:16 And in very deed for this cause have I raised thee up, for to shew in thee my power; and that my name may be declared throughout all the earth.
Exo 9:17 As yet exaltest thou thyself against my people, that thou wilt not let them go?
The Bible says many are called but few are chosen but not too many people get called because of their heart condition that they are self exalting, power hungry, greedy, and love to rule over people, which in other words they do not have love for people like they should.
Pharaoh was such a man and God knew he would not change so He used Pharaoh to show His power on earth that He is the one true God.
When the Bible says God hardened Pharaoh's heart I do not believe God hardened his heart personally but allowed an evil spirit to harden his heart or he got hardened operating in the flesh.
Exo 9:27 And Pharaoh sent, and called for Moses and Aaron, and said unto them, I have sinned this time: the LORD is righteous, and I and my people are wicked.
Exo 9:28 Intreat the LORD (for it is enough) that there be no more mighty thunderings and hail; and I will let you go, and ye shall stay no longer.
At the 7th plague Pharaoh was softening and saying he sinned and asked Moses to intreat the LORD for his sin but he would harden his heart again but I believe God did not harden his heart personally which you read in the Bible that God would allow an evil spirit to affect a people because they loved not the LORD but it was because the people did not have God on their side.