II Kings 15-16
“Ahaz was twenty years old when he became king, … and he did not do what was right in the sight of the Lord his God” (16:1-2). King Ahaz was the son and grandson of righteous kings (15:34) and the descendent of David, but he worshipped idols, practiced idolatry, and made treaties with the pagan Assyrians (ch 16). The righteousness of his ancestors didn’t make him holy, nor did his fear of God’s judgment.
The kings of Judah and Israel made their own choices. Role models and good teaching are influential but not everything; in the end, we each choose our own way.