Moses wrote of the journeys of Israel through the wilderness, telling of the places where they stayed, whether for a long time or a short time,
Now the children of Israel moved on and camped in Oboth. And they journeyed from Oboth and camped at Ije Abarim, in the wilderness which is east of Moab, toward the sunrise. From there they moved and camped in the Valley of Zered. From there they moved and camped on the other side of the Arnon, which is in the wilderness that extends from the border of the Amorites; for the Arnon is the border of Moab, between Moab and the Amorites (Numbers 21.10–13).
Israel may not have known why they moved from one location to another, but the Lord had made plain that they were in the wilderness for not believing that He could give them the Land of Canaan. Also, if He had kept them in one location during the 40 years of wandering, they may have settled down and thought that was their home.
No, He wanted them in the Land of Canaan, and He wanted them to remove the Canaanites because of their abominations.