On the subject of assurance of salvation, R. C. Sproul, in his book Essential Truths of the Christian Faith, points out four possibilities.
First, there are those who are unsaved and they know that they are unsaved. They don’t make any claim of salvation.
Second, there are people who are saved but do not know they are saved. They doubt their salvation, perhaps due to a troubled conscience.
Third, there are people who are saved and know that they are saved.
Fourth, there are those who are not saved but confidently believe that they are saved. They have false assurance.The Apostle appears to address the second group—those who are saved, but have doubts—whether due to actual failings, or owing to a hyperactive concern about the quantity or quality of their deeds.
John wants his readers to know the basis and the blessings of true assurance.