God is a jealous God. He makes this abundantly clear. He puts considerable emphasis on this. He will not tolerate his people worshiping anything or anyone else.
This is so central to everything that he declares he will visit any iniquity to the third and fourth generations.
That sounds like he will punish innocent children for choices they had nothing to do with.
First of all, just to get it out of the way, I don’t think the third and fourth generations are a specific and literal number. It sounds a bit emphatic. It’s making a point. And that point is the whole point. God isn’t going to punish the children, exactly. Rather, the consequences of turning away from God will be extensive, pervasive.
This passage causes problems because it seems to be directly contradicted throughout the rest of the Bible. It is later said in Exodus that God won’t punish children to the third and fourth generations. Deuteronomy outlaws punishing parents or children for the sins of the other. Ezekiel admonishes the Israelites against quoting a proverb that sounds based on this passage, or at the very least the idea that children suffer the consequences of their parents actions, assuring them that each individual will be judged independently.
So what to do with this passage? Well, if a man works hard and saves his money and builds a fortune, it benefits his son. If his son then gambles it all away, there will be nothing left for the grandson. The grandson is hurt by the son’s actions, but that doesn’t mean he’s punished, exactly, for someone else’s mistakes. He just… doesn’t get to have them reset.
If Israel turns away from God, as they do more than once, and are taken captive as a result, their children are born in captivity. The children aren’t being held accountable for their parents’ actions, but they aren’t home in Jerusalem either.
This is a warning. Our actions have consequences that will be felt by more than just ourselves. God’s love is steadfast, eternal, deeper and truer than we can fully comprehend. When we walk away from that, we set our children up for hardship. Take responsibility for that.