Ahaz was defeated by the Arameans and the king of Israel because he and his people had forsaken Yahweh, the God of their ancestors.