Joshua Left some Lessons
 Now these are the nations that the LORD left, to test Israel by them, that is, all in Israel who had not experienced all the wars in Canaan.  It was only in order that the generations of the people of Israel might know war, to teach war to those who had not known it before.  These are the nations: the five lords of the Philistines and all the Canaanites and the Sidonians and the Hivites who lived on Mount Lebanon, from Mount Baal-hermon as far as Lebo-hamath.  They were for the testing of Israel, to know whether Israel would obey the commandments of the LORD, which he commanded their fathers by the hand of Moses.  So the people of Israel lived among the Canaanites, the Hittites, the Amorites, the Perizzites, the Hivites, and the Jebusites.  And their daughters they took to themselves for wives, and their own daughters they gave to their sons, and they served their gods.
Wait, so Joshua deliberately left some of the promised-land unconquered? One of the two guys out of all of the millions of Hebrews that knew God would give it to them didn’t take all of the land?
That’s right, but it was strategic.
When we harvest tomatoes, there are some that are split and nasty and others that are so round and perfect that they were photoshopped. I like to leave the perfect ones on the vine when my 9 year old is helping me harvest. He sees those beauties and knows they are perfect to harvest. Sometimes I point out one that we missed and when he grabs it, it’s a mess of white foam and maggots. He knows that is a bad one and knows how to not freak out and throw it at me in disgust.
Joshua wanted the next generation to get a little sample of the war they all went through to take the promised land. If they got it too easily, they might not despise the evils of the foreign religions and forget the Lord God. This was a testing, not a tempting. There is a big difference.
Temptation is from the devil with the goal of humiliation.
Testing is from God with the goal of edification.
By testing them, God was able to reveal what was inside of them. Like taking an assessment test, they were able to see where the measured up in faithfulness. (They failed.)
Temptation is from the devil with the goal of making us feel bad. Either from being depressed that we can’t have what we’re tempted with, or with the guilt of being tempted, or even the guilt of giving in, temptation has no fruitful goal for us.
God had mercy on them for failing the test by sending various judges to learn and help Israel for a few hundred years. The testing was to see where they were week and which classes they needed to take.
True, Joshua set them up, but God would come through with the teachers to help them.