Deuteronomy 4:5 Behold, I have taught you statutes and judgments, even as the Lord my God commanded me. 6 Keep therefore and do them; for this is your wisdom and your understanding in the sight of the nations, which shall hear all these statutes, and say, Surely this great nation is a wise and understanding people.
[Patriarchs & Prophets pp 369] In the deliverance of Israel from Egypt a knowledge of the power of God spread far and wide. The warlike people of the stronghold of Jericho trembled. “As soon as we had heard these things,” said Rahab, “our hearts did melt, neither did there remain any more courage in any man, because of you: for Jehovah your God, He is God in heaven above, and in earth beneath.” Joshua 2:11. Centuries after the exodus the priests of the Philistines reminded their people of the plagues of Egypt, and warned them against resisting the God of Israel.
God called Israel, and blessed and exalted them, not that by obedience to His law they alone might receive His favor and become the exclusive recipients of His blessings, but in order to reveal Himself through them to all the inhabitants of the earth. It was for the accomplishment of this very purpose that He commanded them to keep themselves distinct from the idolatrous nations around them. Idolatry and all the sins that followed in its train were abhorrent to God, and He commanded His people not to mingle with other nations, to “do after their works“, and forget God.
He forbade their marriage with idolaters, lest their hearts should be led away from Him. It was just as necessary then as it is now that God's people should be pure, “unspotted from the world.” They must keep themselves free from its spirit, because it is opposed to truth and righteousness. But God did not intend that His people, in self-righteous exclusiveness, should shut themselves away from the world, so that they could have no influence upon it.
John 17:15 I pray not that thou shouldest take them out of the world, but that thou shouldest keep them from the evil. 16 They are not of the world, even as I am not of the world. 17 Sanctify them through thy truth: thy word is truth.
May The Lord add His blessing to the study of His word. God bless!