The Spirit of God indwells us when we become born again. Though we are saved by grace through faith in Christ, there are consequences when we practice sin while under grace. One effect is that we grieve the Holy Spirit when we do so. Like God, the Holy Spirit is holy. He will not give us a pass when we practice sin. His purpose is to lead us in the way that pleases the Lord.