Throughout their history, the Israelites committed grave sins that could have easily justified their complete destruction. Yet, rather than wiping out the nation, God chose to sustain them. The primary approach among commentators is that God's profound mercy actively prevented the absolute end of the Israelites, regardless of how many times they failed.
This enduring relationship remained intact even during the darkest periods of exile. Rather than withdrawing His care or abandoning His people in the lands of their captors, God accompanied them into exile to continue watching over them [רלב״ג, מלבי״ם].
This constant kindness is rooted in God's inherently gracious and merciful nature. His compassion flows directly from His commitment to remember and uphold the covenant and the kindness He originally promised to the ancestors of the nation. Because of this, He never breaks His agreement with His people, maintaining His bond with them even when they suffer under the rule of their enemies [מלבי״ם].