The idea is that from viewing King David's response to his sin with Bathsheba we can see how we should respond to our sin. In other words, how God wants us to respond when we sin.