While Asa reigned forty-one years king of Judah, and did right in the eyes of the Lord, six kings ruled over Israel to the north: Nadab, Baasha, Elah, Zimri, Omri, and Ahab. The reigns of the kings lasted from 7 days (Zimri) to 24 years (Baasha), but no matter, each life was summed up in a phrase, by their relation to God, and these kings did evil in the eyes of the Lord. (It doesn't actually say Elah did evil. He was too drunk and too dead within two years to cause too much trouble.)
That each king of Israel did evil was shared by one other trait, they walked in the sinful way of Jeroboam. Jeroboam slipped off the path toward idolatry and, left unchecked, each successive king strayed farther, until Omri did more evil than all who were before him (1Kings 16:25), and Ahab more evil still (v 30). Judah's king Asa, on the other hand, did as David his father had done. David did what was right in the eyes of the Lord and did not turn aside from anything that he commanded him all the days of his life, except in the matter of Uriah the Hittite (1Kings 15:5).
Stop! David had sex with Uriah's wife, then David murdered Uriah. That is no small sin. How does David end up right and Jeroboam wrong? The difference is not the sin, but later, when the prophets came. Both were confronted, but Jeroboam did not repent and David did. "For I know my transgressions, and my sin is ever before me. Against you, you only, have I sinned and done what is evil in your sight" (A Psalm of David 51:3-4). As big as David's sin, God's grace is bigger still.
Create in me a clean heart, O God,
and renew a right spirit within me.
Restore to me the joy of your salvation.
~Psalm 51:10, 12
My God, blessed is he whose transgressions are forgiven, whose sins are covered. Blessed is the one whose sin the LORD does not count against him and in whose spirit is no deceit.
Thank You, God, for Your grace.