A fascinating question because I used to intentionally make my characters Mary Sues. As a former child who used to write, for a while I never understood why people would give character traits they disagree with to the character or characters who are supposed to represent what is right in your world, since they’re the ones unfolding the story’s solution. This had the side effect of my main character being nicer than me, and sometimes my parents would remark to me “why can’t you be like your main character”, which had the side effect of putting me on the fast track to self-improvement. Anyone else?
Selflessness and compassion.