Problem: This passage says that God led Israel into the wilderness in order “to know” what they would do. But if God knows everything already (Ps. 139:7–10; Jer. 17:10), then why did He need to do this to know whether they would obey Him?
Solution: God in His omniscience was already aware of what they would do. He led them into the wilderness in order to prove them. The parallel expression in this very verse is to “test you, to know what was in your heart.” (See also discussion under Gen. 22:12.)