These are just my own thoughts from my own studies. And yes, I do struggle with this concept, particularly due to the commandment of not murdering. I see it as God's plan for His people was to be completely holy (set apart). He wanted a zero percent chance that His people would be influenced by pagan deities. This is why in Deuteronomy, He commanded Moses, and therefore Joshua, to completely wipe out everything and keep nothing for themselves. Joshua 13 describes this not being done, and the book of Judges begins with the result of this disobedience. So, if the purpose was to have an area of land that only His people possessed and, as a result, could follow His statutes and commandments without fear of being led astray from the inside...I get it. It still seems very cruel for me to comprehend, but it makes more sense to me that way. Two big unresolved questions that I still have are: How does the commandment in Exodus 20 not apply here, and if the Israelites were turning to pagan gods while isolated in the wilderness, why would it have helped to isolate them in a new land? Anyway, just my thoughts.