A little Googling turned up
this. I don't really like this explanation, mostly for complicated reasons that go into questions of determinism versus free will. If God knows in advance what any of us will do in a given situation, then how are we any better than computers and how do we have free will?
Anyway, the major question is left unanswered: why should the Pharaoh's intransigence be an excuse to send plagues against the populace, when God presumably has much more targeted methods available? It would be as if the US reacted to Iran's nuclear weapons program by carpet-bombing Iranian villages.