Israel asked the LORD

Joshua had died, and Israel had no leader at this point in the Promised Land. The people of Israel had been used to a way of life prior to this. They had received instructions from Moses and had to follow, and received instructions from Joshua and had to follow. Not once had any of them had to receive directly from God in order to do something for the Nation. But now, the situation has changed.