Jehovah could read the hearts of David and Bath-sheba and see their genuine repentance. Taking
such a factor into consideration, he judged them accordingly, in a merciful and loving manner.
Why do they say David and Bathsheba. Surely if Eve was deceived and Adam not so, then too Bathsheba would be considered such while David not. We can only imagine the time and thought and planning that went into seducing Bathsheba and arranging for the death of her husband. When I was an elder we were trained or taught to ask leading questions to determine if repentance was sincere or if rather they were just sorry they were caught. If David were judged on that basis, knowing that it was meticulously planned and not spur of the moment, surely his repentance if declared would be null and void. And as mentioned on another thread there was guilt attached, just that the punishment was transferred to the child.