II Samuel 9-11
"... my lord Joab and the servants of my lord are camping in the open field. Shall I then go to my house to eat and drink ...?" (11:11). Uriah the Hittite refused to think of his own comforts, but instead chose to identify with his fellow-soldiers still at war. David, meanwhile, had changed from the generous king who reached out to Jonathan's son Mephibosheth (ch 9). Now, he let others fight for him and thought only of his own idle pleasure.
David's path toward sin began before he saw Bathsheba. When his own comfort became priority, he was in danger.