Sometimes it is an unconscious attempt to cover guilt they may feel in their own life. Let her who thinks she stands, take heed lest she fall. Practice purity where it starts in your mind. A story I heard about gardening keeps me at it, though. Our minds are a lot like gardens, which when left alone become overgrown with whatever seeds are sown there.
Lustful thoughts are some of the thorns that can sprout in an untended mind.
For Christians, God wants to work in our minds but He needs our cooperation. Ask God for a check-up. Ask Him to strengthen you against any particular tempting situations you face. Let Him pinpoint dangerous areas that could lead to sin. As soon as we know something is wrong, we need to destroy it by neglect.