It's called not writing a wish fulfilment lead character.
Like Luke and Han?
You obviously don't know what a wish fulfillment character is. A wish fulfillment character and a MarySue share a lot of the same criteria, although perhaps not all of the same. A wish fulfillment character is the kind of character that:
* is always the savior of everyone.
* good guys/good people instantly like them.
* bad guys are jealous of and admire.
* has dreamlike powers that require no development.
* powers make enemies cower and friends stunned in awe.
* are smarter than everyone else (even seasoned experts).
* almost never needs help or saving themselves.
...amongst other similar factors and traits. That character type is aptly titled. Their story unfolds like an idealistic (and egoistic) dream where everyone fawns over them, everyone needs their help, everyone is impressed by them, and everyone is obsessed with what they're going to do next. The wish fulfillment character often has a unique power that is the answer to solving a vital crisis. Or an omnipotent power that no one else can match; and enemies embarrass themselves challenging it.
Luke (for the most part) is not a wish fulfillment character.
Luke Skywalker's criteria that meet wish fulfillment:* makes the kill shot on the Death Star with, at most the cumulative equivalent of a day's training in the Force
* his training by Yoda was several weeks; enough to stalemate Vader a few times in their duels although Vader dominated
* Emperor (Palpatine) regarded Luke as a lethal threat despite Luke's relative inexperience; although perhaps there were offscreen reasons, i.e. perhaps the Emperor had visions of Luke potentially ruining his plans.
Luke Skywalker's criteria that doesn't make him a wish fulfillment character:* amateur pilot who has had combat training; he was already qualified to move on to advanced training at the academy
* Luke is not liked the patrons of the Mos Eisley cantina; more importantly they are not impressed by them nor respect him
* Han Solo doesn't like Luke when first meeting him. It takes time before Han accepts him as a friend.
* Han saved Luke's life numerous times. Only in the last movie of the trilogy does Luke become Han's savior. And even in ROTJ Han still has success apart from Luke i.e. shutting down the shields around the Death Star.
* although Luke had a few shining moments against Vader in TESB, Vader kicked his butt
* Vader never considered Luke a threat, didn't respect him, and was rarely impressed by him; "Perhaps you are not as strong as the Emperor thought." "He's just a boy! ObiWan can no longer help him."
* Luke needed saving many times from a multitude of people: Han, Leia, ObiWan, other Rebel pilots, and finally Vader
* Luke failed but always seemed to learn something from it
By contrast Rey is far more a wish fulfillment character.
What does make Rey a wish fulfillment character:* Rey didn't need any training or guidance to use the Force against opponents and be very successful, even a trained Force user like Kylo
* Rey trained herself after meeting Master Luke. The one meditation lesson she got from Luke wasn't even necessary. It just served as way for her to show off and impress Luke.
* Luke is instantly impressed by Rey.
* Han is immediately impressed by Rey and quickly takes to liking her.
* Chewbacca immediately likes Rey
* In 3 trips in the Millennium Falcon and no prior experience, Rey can outfly and outgun both Han Solo and Chewbacca who had decades of experience in it.
* In TFA Rey gives advice to Han on how to fix his own ship. In TLJ Rey gives advice to Chewbacca on how to fly.
* Leia sent a total stranger (Rey) to find Luke. Not herself. Not her most experienced pilot Poe. Not one of her most trusted generals or accomplices. Leia instantly likes her and trusts her.
* Rey always saves herself out of any trouble she gets into. That's in stark contrast to any other SW protagonists.
* Force ghost Yoda shows up to tell Luke and the audience that Rey needs no training to overcome every obstacle that she is going to encounter. Why? No explanation, no reason given. She just doesn't. (At least Lucas gave
some kind of supposition as to why Anakin was the chosen one).
The only other character who routinely saves people or is successful is Poe. But in TLJ, any saving/success Poe provided was painted as foolish risk taking. It got other people unnecessarily killed or potentially could have. This is a typical strategy to put all of the glory on the wish fulfillment character. In contrast you called Luke a wish fulfillment character, but like Poe some of Luke's actions were seen as foolish risks by Yoda and ObiWan. Another difference that shows that Luke is not a wish fulfillment character but Rey is.
* Rey, who went to Luke for apprenticeship, has to save Luke from his own self pity (despite the fact that such a portrayal of Luke totally strips away all of his character development in the OT). Rey saves everybody, even her master.
Kylo is thoroughly overwhelmed by Rey the first time she used the Force against him. He is impressed to the point of being frightened by her.
* I could literally list a dozen more examples, but for the sake of time I won't.
How Rey isn't a wish fulfillment character:* Rey couldn't defeat Snoke.
* Rey grew up as a ship parts salvager which should support Rey's abilities at repairing starships. Although it's arguable how much; i.e. an auto parts salvager could probably fix more on a car than the average person but it does make them a certified auto mechanic.
* Rey has some previous proficiency in melee weapons. She shows skill in the bo-staff. But there's no exposition on how she learned. It seems unlikely that Unkar Plutt taught her.
I never said Rey was a lowlife thief. I simply gave Rey the same start that JJ Abrams did: she is a parts salvager on Jakku who surrounded by petty crime, i.e. other salvagers stealing from each other which was implied in her encounter with Teeto, and also the thugs who tried to beat Rey up and steal BB8.
So if you got a problem with how I had Rey start out, take it up with Abrams. At least my version gave plausible reasons for why Rey does what she does in the movies... instead of hating it/not wanting to do it. But doing it because of some pure sense of it's the right thing to do despite never having a life example. By the way that's another Disney warrior princess trait.