"[Abijah] committed all the sins his father had done before him; his heart was not fully devoted to the LORD his God, as the heart of David his forefather had been. Nevertheless, for David's sake the LORD his God gave him a lamp in Jerusalem by raining up a son to succeed him and by making Jerusalem strong. For David had done what was right in the eyes of the LORD and had not failed to keep any of the LORD's commands all the days of his life - except in the case of Uriah the Hittite." (1 Kings 15:3-5)
Abijah sinned.
God blessed him despite his sin because of the righteousness of his federal head, David.
David's righteousness was imperfect, so there was a limit to the covering provided.
One day the covering wore out, as the hole spread and split the whole garment.
The lamp was removed, no son of David reigned and Jerusalem burned.
We sinned.
God blessed us despite our sin because of the righteousness of our federal head, Jesus Christ, son of David.
David's greater son, did what was right, with no exception.
Christ's righteousness was perfect without exception, so there is no flaw in the covering provided.
If we repent of our sin, our lamp will never be removed, for Christ reigns forever and we live in a lasting city.