God’s desire was to bless His chosen people. His rescuing of the people from Egypt, the ten commandments, the other rules and regulations, the promises, they were all made because God saw them as a holy people, who belonged to Him. They were chosen to be God’s own special treasure because:
7:7-8 The Lord did not set his heart on you and choose you because you were more numerous than other nations, for you were the smallest of all nations! Rather, it was simply that the Lord loves you, and he was keeping the oath he had sworn to your ancestors.
The price was total obedience to God, even to the point of destroying everything not of Him in the land they were to occupy:
7:25 You must burn their idols in fire, and you must not covet the silver or gold that covers them. You must not take it or it will become a trap to you, for it is detestable to the Lord your God.