The survival of a royal dynasty is never guaranteed, especially when a king falls into severe sin. By strict justice, the ruling monarch committed acts so grave that he forfeited his right to the throne and should have perished in his war against Jeroboam. However, his miraculous victory and the continuation of his reign were not the result of his own merit. Instead, God allowed him to endure entirely for the sake of his ancestor David and for the sake of Jerusalem [מלבי״ם, מצודת דוד].
God granted a lasting legacy to David to ensure his line would not be extinguished. Commentators explore the nature of this enduring promise. One approach understands this gift as a lamp, serving as a powerful symbol of royalty, authority, and unbroken continuity [מצודת ציון, ביאור שטיינזלץ]. Another perspective views it as freshly plowed, cultivated land that yields fruit. This agricultural metaphor represents the ability to produce future generations, such as King Asa, who would carry the dynasty forward [רלב״ג, ביאור שטיינזלץ].
The ultimate purpose behind this divine promise is twofold. First, it ensures that a royal heir will always rise to take the throne. Second, it serves to firmly establish and sustain Jerusalem as both the royal capital and the holy city [רלב״ג, ביאור שטיינזלץ]. Sustaining Jerusalem inherently involves the preservation of the Temple. This sacred structure is best protected and maintained when the city remains under the leadership of the descendants of David and Solomon, the very kings who originally built it [מצודת דוד, חומת אנך].