Deuteronomy 9:5yarash
"It is not for your righteousness or for the uprightness of your heart that you are going to possess their land, but {it is} because of the wickedness of these nations {that} the Lord your God is driving them out before you, in order to confirm the oath which the Lord swore to your fathers, to Abraham, Isaac and Jacob.
Nations driven out for their wickedness, not Israel's righteousness.
1 Chronicles 17:21garash
"And what one nation in the earth is like Your people Israel, whom God went to redeem for Himself {as} a people, to make You a name by great and terrible things, in driving out nations from before Your people, whom You redeemed out of Egypt?
Driving out nations shows God's unique redemption of Israel.