The story of David and Bathsheeba is known to most of us. He climbed the top of his house and saw a beautiful woman bathing. He sent for her, slept with her and arranged for her husband to be killed at war. This is not a new story to ardent readers of the word.
The part of that story we do not see often is where the bible says, "In the spring of the year when kings normally go out to war,...David stayed behind in Jerusalem" ( 2 Samuel 11:1).
That scripture underscores the importance of being in the right place at the right time.
David wouldn't have fallen into the sin of adultery If he had joined other soldiers at war because that was the war where kings fought.
That idleness was an occasion for Satan to get him involved in immorality that later had a grave consequences. He pushed Joab and others to war but he stayed back.
When you are not where God want you to be per time, there is every tendency to derail and be found doing what is not glorifying.
One of the reasons some people do not have time for vices and the works of the flesh is because they are busy with their God-given assignment. Get busy with what God has assigned to you.