What does 2 Samuel 11:1-5 mean?

1 And it came to pass, after the year was expired, at the time when kings go forth to battle, that David sent Joab, and his servants with him, and all Israel; and they destroyed the children of Ammon, and besieged Rabbah. But David tarried still at Jerusalem. 2 And it came to pass in an eveningtide, that David arose from off his bed, and walked upon the roof of the king’s house: and from the roof he saw a woman washing herself; and the woman was very beautiful to look upon.

3 And David sent and enquired after the woman. And one said, Is not this Bathsheba, the daughter of Eliam, the wife of Uriah the Hittite? 4 And David sent messengers, and took her; and she came in unto him, and he lay with her; for she was purified from her uncleanness: and she returned unto her house. 5 And the woman conceived, and sent and told David, and said, I am with child. (2 Samuel 11:1-5 KJV)

Thomas Scott

Verses 1-5: David committed the management of the war against Ammon to Joab, and continued at ease in his palace, when he ought to have been “fighting the battles of the LORD;” and thus being out of the line of present duty, he slothfully wasted his time. Without doubt his prosperity had gradually rendered him more negligent in his devotional exercises, and more self-indulgent; and perhaps had occasioned some measure of self-confidence and carnal security. Thus his passions gathered force in proportion as his holy affections abated; and having been accustomed, without censure, to marry any single woman for whom he conceived an affection, his inclinations had not been habituated to a denial. When therefore, after an unseasonable sleep, he was walking on the flat roof of his house, and by some means had a view of a very beautiful woman, who was washing herself from a ceremonial uncleanness, he allowed himself to gaze upon her until he lusted after her in his heart; and perhaps supposing her not to be a married woman, he sent to inquire after her, in order to add her to the number of his wives. But his sinful passion had acquired such an ascendancy, that he was the more inflamed by being informed that she was the wife of one of his bravest and most faithful officers. He therefore sent messengers for her, who could not be ignorant of his intentions; and though she was previously a person of virtue and reputation, he obtained her compliance (probably by means of those hopes which his rank in life was capable of inspiring), and committed adultery with her.—This crime was attended with manifold aggravations; it was a violation of the seventh commandment; it was likewise punishable by the death of both parties according to the  judicial law. David was chief magistrate, to whom it belonged to carry that law into execution; he was at this time about fifty years of age, and he had already many wives, and many children also approaching to man’s estate, to whom the example would be prejudicial in the extreme. His acquaintance with the divine law, his open profession of true religion, his high reputation for piety and wisdom, and the immense obligations which the Lord had conferred on him; the rank and character of Bath-sheba too, and the service for him and his country in which Uriah was engaged, were all circumstances which greatly aggravated his offence.—When Bath-sheba found that she was with child by David, she justly dreaded the resentment of her husband, who had been absent from her for a considerable time; and she sent to inform David, that by the iniquitous interposition of his authority, which perhaps he had promised, she might be preserved from being made a public example. (Le 20:10. Note, Mt 1:18-19) —Most of the Jewish writers, on the most frivolous pretences, exculpate both David and Bathsheba as to the adultery, and only condemn David as to the murder! This is a specimen of their morality!