Uriah was more noble when he was drunk than when David was sober. Even when alcohol weakened his defenses, he was still true to who he was-a soldier. That was his first calling.
David, since he did NOT go to battle, had first forgot who he was--a soldier and because he made that first step, the rest was becoming easier.
We have to remember who we are first. We are Christians and our first duty is to our Lord. All the pleasantries and blessings of this life are secondary.
Uriah was within his right to sleep with his wife, but his first duty was as a soldier.
If we forget who we are, if we forget who we were called to be, then sinning will become a lot easier.