The Israelites had to conquer that land by winning under God’s guidance. Annihilate some, rule over others, depending on God’s orders and those orders were based on the sin of the nation. Child sacrifice? Annihilate.
That’s just it though, they did not annihilate the child-sacrificing Baal worshippers (in the North iirc?). They got tired of the battles and thought “Hey - we’ve got plenty of land now.”
Obviously a U.N. Charter isn’t the same as keeping God’s commands, but they still should do everything they reasonably can to keep control of the land they were allotted - and the land that they won after the various wars.
Razing their own homes sounds a lot like “we’re tired of fighting and we have enough land.”