Because of David’s immoral relationship with Bathsheba and his attempt to cover his sin by having her husband murdered, he faced the wrath of God. While he would be forgiven for his sin, he would pay a hefty price in the form of the death of their illegitimate son.