Why didn't God punish David instead of taking the life of his child, which had done nothing to deserve death? One could argue that it was a great punishment to have the life of his child taken. If so, how was it fair for the baby to be punished for the sin of his father, David? Why not directly punish David?
2 Samuel 12:14
LS1910 - 14 Mais, parce que tu as fait blasphémer les ennemis de l'Eternel, en commettant cette action, le fils qui t'est né mourra.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
God said he would visit the sins (or punishments of those sins) onto the children up to the forth generation.