I think the question needs to be asked... what is the purpose of these letters? I honestly have a hard time imagining a situation where this could be justified for such trivial purposes as you mentioned.
There is a psychotherapy technique that involves a similar method, but that's a different question entirely... and such things should probably involve mental health professionals.
There is a bit of a contradiction between:
A makes use of these correspondences for genuine educational purposes (i.e. A is not a psychopath).
and
without any hidden goal apart that of being B's good friend and having some good time together.
As annoying as it may be, "genuine educational purposes" do count as a "hidden goal" here, and, frankly... are inadequate to justify the deception (to my mind). What educational goal is being furthered by the secrecy?
The second quote begs the question, "Why can't you be a good friend and write letters to each other... knowing who the other person is?". What is being accomplished by the deception?
A's behaviour presents obvious ethical dilemmas (starting with children's right to privacy, their right not to be deceived/misguided). Can it be ethically acceptable or is there a way to make it ethically acceptable?
Honestly, it fits more in the category of "bewildering" than "unethical". (On a side note, I think teaching children that they have some sort of "right" not to be deceived or misguided is almost as foolish.)
My bigger concern is that systematically lying to someone over a period of years for no particular benefit does not seem like a good thing for a parent-child relationship. There can be good reasons for a long-term deception, but usually they are limited to softening emotional blows until a certain maturity level.
Is that worse than parents pretending to be Santa Claus or the Tooth Fairy?
This is a different situation. Here parents are positing that a particular fantastical being exists, knowing that a child will eventually learn that they do not. This is different from actively creating and playing false personas for the parent's purposes.
The ruse for the Tooth Fairy is a way of distracting a child from the otherwise rather frightening experience of their teeth falling out (usually at least somewhat painfully).
Post-EDIT:
Nothing in this edit makes me more supportive of this idea. If anything, it makes me much less supportive.
Expose the child to great personalities, fictitious but realistic, inspiring, able to communicate with the child and teach them something in a context that is outside what the child perceives to be "family" or "school"....
Unfortunately parents are not enough: all children need many good quality one-to-one interactions with as many different educators as possible, and from as many different cultural backgrounds as possible
So, the point is to give the child the idea that they're hearing a number of points of view, when in reality the world around them is being manipulated as if they were playing a tabletop RPG with mommy gamemaster who maintains absolute control over every 'different' voice.
however educators, relatives and friends are usually not able or not willing to engage, cooperatively with the families, in activities so much tailored on the needs of one single child. This trivial trick would allow the child to interact with astrophysicists, musicians, artists, philosophers, mathematicians, neuroscientists, etc. - and these would not be just "mum" or "dad", they would have an aura of magic, they would be fascinating - which parents cannot usually be. And having real pen-friends is such a great educative experience for children of that age, expanding so much their normal, little microcosms.
With far less effort involved in this sort of trickery, you actually can expose your children to actual scientists, musicians and artists. (neuroscience and mathematics are... honestly... not all that fascinating for a pre-teen) This is the age of TED talks and stackexchange, youtube and the arXiv.
You are underestimating the power of a child's imagination, and substituting role-play in where none is needed.