John wrote to them to teach them.
John was teaching them and reminding them that they have God's Spirit to teach them, and do not need to heed the deceivers that pose as teachers, who would lead them astray concerning Christ.
John was teaching them the truth concerning the promise of the New Covenant.
31 "Behold, the days are coming, says the Lord, when I will make a new covenant with the house of Israel and with the house of Judah--
32 not according to the covenant that I made with their fathers in the day that I took them by the hand to lead them out of the land of Egypt, My covenant which they broke, though I was a husband to them, says the Lord.
33 But this is the covenant that I will make with the house of Israel after those days, says the Lord: I will put My law in their minds, and write it on their hearts; and I will be their God, and they shall be My people.
34 No more shall every man teach his neighbor, and every man his brother, saying, 'Know the Lord,' for they all shall know Me, from the least of them to the greatest of them, says the Lord. For I will forgive their iniquity, and their sin I will remember no more." Jeremiah 31:31-34
Example of this from the scriptures:
13 When Jesus came into the region of Caesarea Philippi, He asked His disciples, saying, "Who do men say that I, the Son of Man, am?"
14 So they said, "Some say John the Baptist, some Elijah, and others Jeremiah or one of the prophets."
15 He said to them, "But who do you say that I am?"
16 Simon Peter answered and said, "You are the Christ, the Son of the living God."
17 Jesus answered and said to him, "Blessed are you, Simon Bar-Jonah, for flesh and blood has not revealed this to you, but My Father who is in heaven. Matthew 16:13-17
Did Peter still need to be taught? Yes
Concerning Who Christ was though, flesh and blood did not teach this to him.
Likewise, the context of what John wrote to them, was about the anointing teaching them... about Jesus as the Christ.
If we look at the context in which John wrote to them, we can see that they were being persuaded or deceived or seduced into believing that Jesus was not the Christ.
22 Who is a liar but he who denies that Jesus is the Christ? He is antichrist who denies the Father and the Son.
23 Whoever denies the Son does not have the Father either; he who acknowledges the Son has the Father also.
24 Therefore let that abide in you which you heard from the beginning. If what you heard from the beginning abides in you, you also will abide in the Son and in the Father.
25 And this is the promise that He has promised us--eternal life.
26 These things I have written to you concerning those who try to deceive you.
27 But the anointing which you have received from Him abides in you, and you do not need that anyone teach you; but as the same anointing teaches you concerning all things, and is true, and is not a lie, and just as it has taught you, you will abide in Him. 1 John 2:22-27
Of course the Spirit abides in us and teaches us, however, until we reach a place of maturity where we can feed ourselves correctly, and are anchored in the truth and are not blown about by every wind of doctrine, the Lord has given us the five-fold Ministry, which includes teachers, to bring us to maturity, that is to say, full stature Sonship.
11 And He Himself gave some to be apostles, some prophets, some evangelists, and some pastors and teachers,
12 for the equipping of the saints for the work of ministry, for the edifying of the body of Christ,
13 till we all come to the unity of the faith and of the knowledge of the Son of God, to a perfect man, to the measure of the stature of the fullness of Christ;
14 that we should no longer be children, tossed to and fro and carried about with every wind of doctrine, by the trickery of men, in the cunning craftiness of deceitful plotting,
15 but, speaking the truth in love, may grow up in all things into Him who is the head--Christ--
16 from whom the whole body, joined and knit together by what every joint supplies, according to the effective working by which every part does its share, causes growth of the body for the edifying of itself in love. Ephesians 4:11-16
Like all truth, there is a balance.
It is good that you grasp one thing and also not let go of the other; for the one who fears God comes forth with both of them. Ecclesiastes 7:18
JLB