Once a person turns down the road to idolatry they move into other forms of wickedness, wasting their means and their lives.
Our Lord hates foolishness and has enacted SpiritualLaws which have built into them judgments. These judgments are consequences which can be construed as punishment on those who break those SpiritualLaws.
Deu 28:1-* foresaw these events. So, the uttering that the Lord does is a reminder of what He had already commissioned to happen to the disobedient nation.