Every time I read this I am reminded to not put myself in a position that makes sin easier.
David was the king. Kings go to battle. David stayed home. That poor decision led to more poor decisions. The result was that generational damage was done.
2 Samuel 11:1 ESV
[1] In the spring of the year, the time when kings go out to battle, David sent Joab, and his servants with him, and all Israel. And they ravaged the Ammonites and besieged Rabbah. But David remained at Jerusalem.