….this text is placed immediately following the passage that depicts David’s sin and its personal consequences in the death of his first son by Bathsheba. This is not only because the events of chapter 13 follow closely in time to those of chapter 12, but because chapter 13 describes further consequences of David’s sin. The sin of David that was once personal and private comes to impact the entire nation. David’s sin affects him, his wife and son, and now other members of his family. Soon, David’s sin will divide the nation and deprive David of his throne for a time.
I believe it is true that the death of David’s son (chapter 12), and now the rape of his daughter and the murder of his son (chapter 13), are not God’s punishment for his sin, but God’s discipline. If David were to be punished for his sin, he would have to die. Nathan assured David that he would not die, because his sins had been taken away. The tragedies which take place from this point on are meant to be instructive and corrective, even though they are also painful. This is completely consistent with the teaching of God’s Word (see Hebrews 12:1-13).