Jeremiah 5:19

And it shall come to pass, when ye shall say, Wherefore doeth the LORD our God all these things unto us? then shalt thou answer them, Like as ye have forsaken me, and served strange gods in your land, so shall ye serve strangers in a land that is not yours.

The exile threatened is a just and fitting retribution for unfaithfulness: as the people forsook the Lord and served strange gods in their own land, so they would serve strangers in a land that was not theirs. That service to strangers means subjection to foreign peoples and foreign rulers outside their homeland. This warning stands among prophecies denouncing sin and pleading for the people to return to God. Those warnings and appeals were refused and left unheeded by most of the people.

That refusal to heed and turn back brought the destruction of Jerusalem and captivity in Babylon. Thus rejecting divine instruction brings judgment, whereas turning to God could have averted the disaster.