The Israelites simply didn't have the willingness or desire to obey God's commands. Disobeying God comes naturally for mankind (Romans 8:7). Now let me explain their situation.
The generation that had wandered in the wilderness for forty years had all died. The new generation was brought to the plains of Moab. There Moses taught them the same things he had taught their parents. He then turned over his role of leader to Joshua. In the book of Judges 2:11-12 it tells us that the children of Israel did evil in the sight of the Lord. They forsook the God of their fathers and followed the gods of the people who lived around them. Apparently what happened was in just a few decades they had neglected to train their children up in the ways of the Lord (Proverbs 22:6).
Moses had told the parents to continually teach the children the story about their redemption, the miracles God performed, and the contents of God's covenant with them (Deuteronomy 6:7-9). Each generation needed to be reminded over, and over of God's faithfulness so that it would not fade from their memory.
Tragically, that happened. The nation served God in Joshua and Caleb’s generation and in the generation of the elders who led the nation after Joshua died. Then “another generation arose after them who did not know the Lord nor the work which He had done for Israel” (2:7-10). The result was a series of sins. Cycles of sin, judgment, cries for help, and deliverance.
Whenever they were oppressed by enemies, the Israelites repented and cried out to God, who would faithfully raise up a judge, or defender, to defeat their oppressors and restore peace. Then the enticements of their pagan neighbors grew too strong and the conviction of their fading memories drew too weak and they sinned again. These cycles of sin-oppression-repentance-deliverance formed a downward spiral in which the Israelites become increasingly corrupt and more like the Canaanites.