What does Exodus 8:31 mean?
Well before Moses ever spoke to Pharaoh, the Lord knew how the Egyptian king would respond to divine commands (Exodus 3:19–20). Pharaoh would resist until the most extreme judgment had been delivered (Exodus 4:21–23). Here, Moses upholds his end of a bargain made with Pharaoh: to pray that God would end the plague of flies (Exodus 8:24), after which Pharaoh would release the Israelites (Exodus 8:28–29).This verse doesn't describe God deciding how to react based on Moses' input. God responds to prayer (John 14:14; James 5:16) when requests are aligned with His will. Here, part of the Lord's plan was to add and remove plagues, to prove His own power and Pharaoh's invincible stubbornness. The flies miraculously appeared—and only on the Egyptian people (Exodus 8:22)—and they disappeared just as quickly and entirely. No room is left to doubt a supernatural act of Israel's God; this was clearly not something random or controlled by Egyptian idols.
As expected, Pharoah will go back on his word (Exodus 8:32). This pattern will continue through a total of ten devastating plagues. Only after the last will Pharaoh allow Israel to leave the country (Exodus 12:30–31, 41). Even then, he will once again change his mind (Exodus 14:6–7), leading to utter defeat (Exodus 14:26–27).