The passage in Deuteronomy 20:10-20 is often misunderstood and has been used against Christianity by non-Christians to suggest that God condoned horrific acts of violence such as rape. It is important to understand the context in which this passage was written and to interpret it within the framework of the overall message of the Bible, which is one of love, respect, and dignity for all people.
In the book of Deuteronomy, God gives the Israelites a set of instructions as they prepare to enter the Promised Land and take possession of the land that God has promised them. One of the key themes of Deuteronomy is God's promise to the Israelites that he will give them the land of Canaan and will help them to defeat their enemies.
The passage in Deuteronomy 20:1-20 is part of this larger context, and it specifically deals with the issue of warfare. In this passage, God gives the Israelites instructions on how to approach cities that they are at war with and how to deal with their enemies.
In this passage, God is giving instructions to the Israelites as they prepare to go to war. The passage begins by stating that when the Israelites approach a city to wage war, they are to offer terms of peace. If the city agrees to these terms, the Israelites are to let them live and become subject to them. However, if the city refuses to make peace and decides to fight, the Israelites are commanded to "put all its males to the sword."
From a biblical perspective, it is important to understand that God's judgment on the Canaanites was not arbitrary or capricious. Instead, it was the result of their disobedience to God's commands and their idolatrous practices. Throughout the Old Testament, God repeatedly warns the Canaanites about the consequences of their disobedience and urges them to turn from their idolatrous ways and follow him. However, the Canaanites refused to listen and continued to worship false gods and engage in practices that are detestable to God.
As a result, God ultimately judges the Canaanites and commands the Israelites to conquer the land and defeat their enemies. While this may seem harsh to modern and uninformed readers, especially those who do not know God, it must be understood within the context of the times in which it was written and the cultural practices of the ancient Near East. But it's important to remember that even these practices were ordained by God to be used for His own glory during these times. From a biblical perspective, God's judgment on the Canaanites was a consequence of their disobedience and their refusal to turn from their idolatrous ways.