God punishes people collectively. Maybe it is primitive and uncivilized but that's the way it was done.
Primitive and confusing:
Exodus 20:5-6, I the LORD thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me
; And shewing mercy unto thousands of them that love me, and keep my commandments.
(Ezekiel 18:20) - "The person who sins will die. The son will not bear the punishment for the father’s iniquity, nor will the father bear the punishment for the son’s iniquity
; the righteousness of the righteous will be upon himself, and the wickedness of the wicked will be upon himself."
I can't help thinking of North Korea...