In the Hebrew Bible, one main character name David was the first king of the southern half of the territory of Israel. In the reign of David, he had made some mistakes and one particular mistake he made with God lead to a death with the first born baby. In the Bible, the story of David and Bathsheba is included because it has a moral lesson to learn. People who read this story will get how God will punish the people who sin against Him and how He forgives that particular individual.
The writers of the Bible put this story of David and Bathesheba because the story itself sheds light of David ¡ ¯s human weakness whereas many other stories of David would tell us about his greatness. If it did not have this story, it would have a bias view toward David that he was just a great leader, a powerful general, a skilled musician, and a king. David is also a human who would have a weakness. Another reason it was put in the Bible is that it shows how God punishes the sin people do but also forgives the people who sin. There is a consequence upon the sins we commit. David takes another person ¡ ¯s wife and has a baby with her. This sin that he committed was adultery, but also he committed murder. With David ¡ ¯s actions, he should have been put to death by God, yet God spares his life. In 2 Samuel 12:13, ¡ °I have sinned against the Lord. ¡ ± (NKJ) Nathan was a prophet from God and told David an allegory about the sins David committed. David finally realized that he has sinned against God. 2 Samuel 12:13 ¡ °The Lord also has put away your sin; you shall not die. ¡ ± (NKJ)
If you think about what David did, it is clear that in no way the Bible is making it light or less serious of what David did. But in spite of his terrible sins, we can see his greatness as he was able to earnestly admit what he did wrong and seek God ¡ ¯s forgiveness. After realizing what he did wrong, being right with God and restoring th