Pharaoh looked like a good, moral person by his culture's standards. He worshipped faithfully by the Nile every morning. But in Exodus 7, God says his heart is heavy, guilty, hardened against the Lord. Jesus makes a similar point in Matthew 7. God didn't create us primarily to do good things. He created us for a relationship with him, and a heavy heart is one that hasn't given itself over to that.