This is completely against the Lord’s command. Israel was supposed to destroy the Canaanites completely (Deuteronomy 7:2; Deuteronomy 20:16–17). If they were strong enough to subject the enemy to forced labour, they were strong enough to drive them out. But they instead decided to enslave the enemy for cheap labour.
28 When Israel grew strong, they put the Canaanites to forced labor, but did not drive them out completely.