Our sins affect other people, including our children and grandchildren or as Scripture says, “to the third and fourth generation.” We aren’t punished for our parent’s sins, but we have been affected by them. We suffer when other people sin.
The ancient House of Israel were so far gone, so utterly unrepentant that God’s only recourse was to send 90% of them to the grave and the other 10% into exile. The exile will end only when Messiah Yeshua returns to the earth.