They aren't just crazy, or just plain evil. Actions have consequences. Bad people can improve and find redemption. Unhappy heroes can find themselves, through personal crisis, and in doing so find happiness. Life does have meaning and purpose, though it must be fought for.
Difficulties occur, but they can be overcome.
Not all stories have these spiritual or philosophical messages , but many do. And when these simple but universal themes are woven more or less convincingly into the fabric of good plots and characters, magic happens. And finally, like all good stories and all real stories, manga and anime have a tendency to end. Heroes and heroines die, or get married, or disappear. The anime series are especially good about this.