He did everything he could to please the God he loved. Then lust and sin entered his life. David's life began to change, because now he had to try to cover up his sin.
Throughout the generations of humanity, we can see examples of people trying to cover up some sin, hoping no one will ever find out what they've done. Little do they realize that God knows and sees everything that we say, do and even what we think. There is absolutely nothing that happens in our lives that God doesn't know about. It is so important that we live a life as close to God as we possibly can. When we stand before Him, we won't be able to cover up anything because He knows everything in our hearts. Our lives are an open book to God and yet He loves us in spite of our failures.
Is there anything in your life that you have been trying to cover up? If there is, confess it to God, ask His forgiveness and go on from there to live the best life you can before Him.