To fully appreciate any Scripture reference, it is vital to be aware of context. In the case of these key verses, there are at least two contextual considerations converging. One relates to the restoration of Israel in a future Messianic era, the other to the cultural realities of the city of Corinth. Let's look at the second one first.
Corinth was a pagan city. It was a key worldwide commercial centre that was dominated by the Temple of Aphrodite built on top of an 1800 foot high hill called Acrocorinth. Aphrodite, "the Love Goddess", was served by hundreds of sacred prostitutes, and Corinth was known internationally as a sexual playground. This immoral flavour permeated all aspects of Corinthian society and was endangering the church. That is why Paul digs out a kind of "aggregate" quote from the prophets to encourage the Corinthian Christians to marry fellow believers.
Now look at the "aggregate" quote. I call it that because there are several references in which the essential substance is similar. For example, "Depart! Depart! Go out from there, touch no unclean thing; go out from the midst of her, be clean, you who bear the vessels of the Lord" (Isaiah 52:11). Or, "I will bring you out from the peoples and gather you out of the countries where you are scattered..." (Ezekiel 20:34). And, "I will bring them from the north country, and gather them from the ends of the earth... For I am a Father to Israel" (Ezekiel 31:8,9). The context is that of an historical restoration for a scattered Israel. The message: "stay kosher and don't assimilate, because I'm bringing you back to the Land".
What can we get out of it? Simply this: live morally and in expectation of the kingdom of Heaven. Messiah is at the door.