1 John 1:7 says, "IF we walk in the Light as He Himself is in the Light, we have fellowship with one another, and the blood of Jesus His Son cleanses us from all sin."
We have the continual cleansing of our sins "IF we walk in the light" (as we continue to walk in the light).
1 John 5:13 says, "These things I have written to you who believe in the name of the Son of God, so that you may know that you have eternal life."
How do we know we have eternal life? It is by "these things written". It is by the scriptures.
If we walk in the light of God's word, we have fellowship with other believers and the blood of Christ continues to cleanse us from all sins.
If we do NOT continue to walk in the light, then we have stepped out of that fellowship with other believers and away from Christ's cleansing blood.
Paul wrote, "I discipline my body and make it my slave, so that, after I have preached to others, I myself will not be disqualified." (KJV says "...a castaway".) (1 Cor. 9:27) Revelation 2:10 says, "Be faithful until death, and I will give you the crown of life."
There is that same idea. "If we walk in the light..." But, what if we don't?
Peter wrote, " For if, after they have escaped the pollutions of the world through the knowledge of the Lord and Savior Jesus Christ, they are again entangled in them and overcome, the latter end is worse for them than the beginning. For it would have been better for them not to have known the way of righteousness, than having known it, to turn from the holy commandment delivered to them. But it has happened to them according to the true proverb: “A dog returns to his own vomit,” and, “a sow, having washed, to her wallowing in the mire.”" (2 Peter 2:20-22)
Notice these had "escaped the pollutions of the world" and were "again entangled in them and overcome".
They had "known the way of righteousness" and then they "turn from it".
It is compared to a pig that was washed clean and then returned to the mud, or a dog that was sick and purged its stomach of that which made it ill, and then ate it again. Sickening imagery, but it makes the point!
We must have discipline. Chastening corrects error and helps us to learn to stay on the path we should travel, lest we having known the way or righteousness and having escaped the polution of the world we were to turn back to it.