I've seen it written that Mary Sues, choose your precise definition, are a developmental step we all go through. I don't think this is always true; or maybe I'm just getting there.
My first finished story was fanfic - more adventures of Mike, Mary, and Jeff, which Google tells me were the characters in Macmillan's readers of the time (I was born in 1966). I only remember this story because I read it aloud over the school intercom, why I have no idea, and I stumbled on a word and had to be helped. And I was afraid people would think I hadn't actually written it; but now that I have kids, this seems a totally normal thing to do, and a reminder that there's a reason schools have adults. BID.
I didn't remember writing much again until my friend K, who lived across the court and is two years older than me, started writing a lot. If I wanted to be near K, and I did, I had to write too. So while she wrote stories about animals fighting for survival in a cruel, wild world, I wrote stories about families of bear or mountain lion cubs, I presume because I was reading the Little House books and Arthur Ransome and Elizabeth Enright. I'd work out all sorts of details about each cub, then maybe write them eating dinner, and then have no idea where to go. And - I don't think any of the cubs were me.
When I was 12 and 13, my reading shifted to the YA books of the 1970s, in which nobody lives with both of their biological parents, nobody enjoyed school (or, if they did, it was obviously a crutch), and everybody hated their bodies and their siblings. Since this didn't reflect my life *at all*, as soon as I discovered SF and fantasy (well, Tolkien), I dived in. Stories about competent people, solving problems not totally related to the stupidity or meanness of the supporting characters! Horrah! I don't remember doing any writing during this time, but this was what I was absorting - YA tropes, and SF tropes.
The summer I was 13 I fell for Star Trek hard, taking K with me after about 24 hours of squeeing to my parents. We were going into 9th and 11th grades, respectively, and one of the great things about having an older best friend was that we were allowed to go to SF and ST cons together as soon as we discovered they existed, which was probably that fall. The cons had writing panels, and IIRC we went to all of them, since K was still writing seriously and I was at least a bit interested.
I don't think we necessarily heard the term 'Mary Sue,' since the panels were focused on the how-tos of pro writing, but there was always talk about writing what you know, and the evils of self-insertion, and of making characters too perfect.
And here was a problem. Though the middle part of grade school had been awful, by 6th grade I'd figured out how to pass for normal, and 7th and 8th grade had been, essentially, fine socially and wonderful academically. By 9th grade, I was in a math and science exam program, so among peers - and still finding myself very smart in comparison to most of them, most of the time. I'd discovered I had a talent for track and field (including an age-group state championship in race walking the summer I was 12), and enjoyed various team sports (though I was lousy at them, I found teams; it was all good); and, to my great amusement, I was tall and blond and, as far as I could tell, reasonable looking. I had great, interesting friends; a good home life; and a bunch of other things were good too, many of which I'd worked pretty hard on myself to make happen, so I was proud of them, and didn't take them for granted.
Girls like me didn't exist in YA books. They did in SF, though they were usually male.
So what was I to write about? Self-insertion was what we were told to do - "Write what you know" - but as a character I was clearly unbelievable. So I tried some stories in which I was myself, but shorter and kind of stupid. These weren't much fun to do at all.
After a bit, I started writing a Star Trek story which still lives in my head - a h/c story, main characters OC male ensigns. I am clearly in the story, but I'm not one of the main characters.
Again I dropped writing, but always had it in my head as something I should be doing. So I took a horrible creative writing course the final semester of college, and a much better one at a CC after graduation. For the CC course, I finished my first story - it's contemporary fantasy, I guess, and it delved into what it never occurred to me to tap - how hard mid-grade-school had been. I showed it to someone, and he said, "Oh, so is the main character you?" And she was, and I realized how very, very much I didn't want people to know the things about me I'd put into the story.
So skip another decade-and-a-bit, and I'm reading fanfic and hear about, and join, a list with a dues requirement - SentinelAngst. For the first time in my life, I can stop worrying about characters and actually do things with them! And, I do.
But sometimes I need OCs. Generally, I pull them out of RL, which is fine if they're only around for a page or two.
Enter my need for Mary Margaret, Jim's mother. She's a pretty major part of my
Summer of 1999 series; I went in knowing I wanted to do things with her, and through her. So I worked on her a lot; even so, the first piece she's in had to be a play, because I couldn't do her internal dialog yet. I discovered OCs were HARD, but also could be, eventually, as fun and familiar as canon characters.
There's nothing Mary Sue about Mary Margaret.
But... okay, if you've read my stories about Blair running a program for sentinels, you probably know my OCs Jason (a sentinel) and Jonathan (first featured prominently in
Sunday at the Camp. Jason wasn't that hard to put together, because I'd been thinking for years about young!Jim, what he was and what he wasn't, and Jason's pretty much what he wasn't. Jonathan, though, is, well, me, done Mary Sue. I mean, he's a teenager, and a boy, but he's me, without the angst or the things I know are bad about me. Because I was lazy and without a character head space to go to, I wrote what was easy.
Jonathan has made some mistakes; and I've given him some growth to work on. But writing him feels very different from writing any canon character in any canon, or my other OCs. I'm pretty sure it doesn't show, but *I* know. And he feels dishonest to me, him taking space I could be using to do other things. And there are things I would like to do with him that I'm getting ooo-gross-can't-show-the-world-THAT about, because, well, he's my Mary Sue.
Knowing that some of my favorite characters in published fiction - I'm mostly thinking of Cordelia Naismith - started out as Mary Sues doesn't help.