This is because sin distorts, perverts, imprisons, enslaves, oppresses, exploits and kills our good life in God, in other words sins need to be removed before we can forget about them.
For example each time we lie we have as father the devil himself and the offspring that our lives conceive are the wicked who don't serve God or honour Him but rather distorts, perverts, imprisons, enslaves, oppresses, exploits and kills us in our righteous life. How can the Holy Spirit bring us God's peace when sin is still actively bring bad life inside of us?
Now if we confess our sin and bring such times to Christ then we are forgiven! The question is do we have faith in Jesus? For then He will take away the bad life and replace it with His good life. So when that particular sin comes to mind it causes us to thank God for deliverance for He resurrected our lost good life in that part of our lives. This sanctification process ranges in time. Sometimes when the sin is severe for example it can take a long time to be delivered. It usually has to do with the measure of faith God grants us to overcome individual sin. In this way God can and does discipline us.
However if we sin and we don't bring that bad life to Christ to deal with but leave it actively alive within then this bad life will attack us in our good life and make us feel bad, in particularly when the sin comes to mind. Guilt, shame, bitter regret and fear are the bad life that comes our way then.
Some people don't understand that bad life dies when we go to Jesus in our sinful self and have full faith in His grace. Such believers struggle to have faith in their salvation because they suffer from a guilty conscience and are often overcome by the accuser. All these believers often need is encouragement to go to God and confess and commit their bad life to Him. The fight to be delivered from a sin can be hefty for we have to learn to look at Christ and trust His mercy and accept His love and let it transform us before we can be delivered from our sin.
Others leave bad life actively working within their hearts and minds believing they have been forgiven for their sins and don't need to die to sinful self and find new life in The Holy Spirit of God. Such people are deluded to belief that God is love and that therefore everything will be fine.
i reckon it is best to understand that God is love and that therefore our lives have to be rebuild in His loving truth before it becomes eternal. This rebuilding process lasts all our lives down here and is a continues fight with the devil, the world and our own sinful inclinations. We are harvested from our fallen lives down here into our new life in Christ along the way. We are not redeemed in our bad life but rather redeemed from our bad life.
So God does not forget about our wilful sins when we have not brought it to Christ for cleansing and renewal either. It is best never to forget this. This is because our image of God has been tarnished by such unforgiven sin. Wilful sin has to die inside of us, and our lives in God needs to be resurrected before we will rule with Christ in such part of our lives.
Colossians 3:5-10
Put to death, therefore, whatever belongs to your earthly nature: sexual immorality, impurity, lust, evil desires and greed, which is idolatry. Because of these, the wrath of God is coming. You used to walk in these ways, in the life you once lived. But now you must also rid yourselves of all such things as these: anger, rage, malice, slander, and filthy language from your lips. Do not lie to each other, since you have taken off your old self with its practices and have put on the new self, which is being renewed in knowledge in the image of its Creator.