David learned the hard way that holiness matters most. Before the King sinned with Bathsheba, "The Lord made David victorious wherever he went" (2 SM 8:5,13).
David wrongly thought he had succeeded in hiding his sin. "The Lord considered what David had done to be evil" (2 SM 11:27).
David never fully escaped the consequences of his sin. Nathan accurately predicted of the King, "The sword will never leave your house" (2 SM 12:10).
Holiness matter most. Pleasing God in everything we do must be tenaciously practiced by us through the Holy Spirit working in us.