They were left there be to a test for the Israelites, to find out whether the Israelites would keep the Lord's commandments which he had given their forefathers through Moses.