God does not attribute the sin itself to the descendants of the sinner, but the effect of the sin does transmit to them in some way. A child that is sexually abused is left with permanent psychological scarring, and that may affect their children in various ways, the worst being that the abused grows up to become an abuser themselves.