Yahweh allowed those things to happen in order to humble king Ahaz, because he had encouraged the people of Judah to do wicked things and had disobeyed Yahweh very much.