Why Do People Write Mary Sues?

For those of you who aren't familiar with what a Mary Sue is, it's essentially a female character that is too perfect. A character that is always morally correct no matter what, has all the male protagonists drooling themselves over her even though she would describe herself as plain, and is special without having to [...]