Simple.
Do a study on repentance, just from the Scripture alone.
You will find that it is far more than just simply confessing your sin.
Someone who has never been born again and doesn't even believe in God can confess their sins ubtil their tonsils fall out and nothing will happen.
John wrote that verse to saved people.
"If WE confess our sin..."
John wrote to "brethren" and "my little children."
In fact, repentace is something God grants.
Act 5:30 The God of our fathers raised up Jesus, whom ye slew and hanged on a tree.
Act 5:31 Him hath God exalted with his right hand to be a Prince and a Saviour, for to
give repentance to Israel, and forgiveness of sins.
Repentance and forgiveness are two very different words.
Act 11:18 When they heard these things, they held their peace, and glorified God, saying, Then hath God also to the Gentiles
granted repentance unto life.
2Ti 2:24 And the servant of the Lord must not strive; but be gentle unto all men, apt to teach, patient,
2Ti 2:25 In meekness instructing those that oppose themselves;
if God peradventure will give them repentance to the acknowledging of the truth;
Repentance is a reversal, a change of mind, a turning away from sin and unto the Lord.
That is a far more profound and all-encompassing process, and one that God must empower, than simply a born again child of God confessing a sin and receiving forgiveness.