Gill perhaps they were thinking of this account and applying it improperly to that situation:
***
w86 3/15 p. 31 Questions From Readersยท After David and Bath-sheba sinned, why did their son have to die, since Deuteronomy 24:16 and Ezekiel 18:20 say that a son is not to die for his father?s error?
David and Bath-sheba were both married persons when they committed adultery and she became pregnant. Their adultery was a grave sin punishable by death under God?s law. (2 Samuel 11:1-5; Deuteronomy 5:18; 22:22) So if God had permitted them to be dealt with by humans under the Law, the son developing in her womb would have died with its mother. But Jehovah chose to handle their case differently, which "the Judge of all the earth" certainly had a right to do.?Genesis 18:25.
When confronted with his guilt, David acknowledged: "I have sinned against Jehovah." Then God?s spokesman told David: "Jehovah, in turn, does let your sin pass by. You will not die." (2 Samuel 12:13) David was shown mercy because of the Kingdom covenant. Moreover, since God is able to read hearts, he must have evaluated the genuineness of David?s repentance and concluded that there was a basis for extending mercy to David and Bath-sheba. Yet they would not escape all the deserts of their error. They were told: "Notwithstanding this, because you have unquestionably treated Jehovah with disrespect by this thing, also the son himself, just born to you, will positively die."?2 Samuel 12:14.
God ?dealt a blow? involving their child to whom they were not entitled; the boy became sick and died. A person today might tend to focus on the child?s death and feel that a harsh judgment was executed. However, it is good to bear in mind that had the adultery been handled by and proved before human judges under the Law, all three (David, Bath-sheba, and the son in her womb) would have lost their lives. Viewed in that light, God?s permitting two of them to survive was merciful. Furthermore, at this late date we do not have all the facts, such as information about the health of the infant immediately after birth. We can, nonetheless, accept God?s handling of the matter, confident that what he did was impartial, wise, and righteous. Even David later acknowledged: "As for the true God, perfect is his way."?2 Samuel 22:31; compare Job 34:12; Isaiah 55:11.
That is consistent with David?s reaction after he heard God?s judgment. While the child was sick, David grieved and fasted. But once death occurred, David appreciated that the matter had ended. (2 Samuel 12:22, 23) So, trusting God?s judgment, David proceeded to comfort Bath-sheba (now his legal wife), assuring her that their marriage relationship would continue. Later Solomon was born to them and became David?s successor.
God?s handling of that case need not be viewed as conflicting with Deuteronomy 24:16 or Ezekiel 18:20.
As part of the Law, God directed: "Fathers should not be put to death on account of children, and children should not be put to death on account of fathers. Each one should be put to death for his own sin." (Deuteronomy 24:16) Those guidelines were for Israelite judges handling legal cases. The judges could not read hearts. They were to deal with each man on the basis of his own conduct as established by the facts.
Similarly, Ezekiel 18:20 observes: "A son himself will bear nothing because of the error of the father, and a father himself will bear nothing because of the error of the son. Upon his own self the very righteousness of the righteous one will come to be, and upon his own self the very wickedness of a wicked one will come to be." This was primarily referring to adults. The context speaks of a son who witnessed his father?s wickedness but refused to share in it; instead, the son carried out Jehovah?s judicial decisions and walked in His statutes. Such a son would be preserved when his father died.?Ezekiel 18:14-17.
It is undeniable, though, that children can suffer consequences because of their parents? actions. Parents who are wasteful or foolish may bring poverty on the whole family. Or imagine the effect on children if a parent is sentenced to prison for criminal activity. Even calamities that God justly brought on Israel for their wickedness affected the children of the time. (Deuteronomy 28:15, 20-32; Ezekiel 8:6-18; 9:5-10) Conversely, God urged his people: "You must choose life in order that you may keep alive, you and your offspring, by loving Jehovah your God, by listening to his voice and by sticking to him; for he is your life and the length of your days."?Deuteronomy 30:19, 20.
Hence, the experience of David and Bath-sheba should emphasize to parents that their conduct can greatly affect their children. If parents ?are in fear of God?s name, the sun of righteousness can shine forth? to the blessing of the entire family.?Malachi 4:2.