I think that the reason we like them in media is because, once you strip out the real world grimness of it, what is left is extreme romance. I mean, who wouldn't be attracted to the idea of being loved so unconditionally that the other person is willing to do unspeakable things for that love?
So girls dream of a prince that will slay dragons for them and boys of a girl that will murder all rivals. xD
At the end of the day we all want to be loved and desired. And what greater desire is there than insanity?
And the fact that Yandere are assertive and aggressive about it also helps. It plays to our desire to once, only once, in our life not have to always be the ones chasing after girls. It's one of those situations where, to quote a cartoon I watched as a kid "Why fight, when you can just win?"
Of course, anyone who remembers that cartoon will also remember why the quote is doubly meaningful for this context.
For reality, as always, has a dark side. And so beware what you wish for. It might just come true.