They also show that one's enemies aren't Just Evil. In series like Gundam, you can see that the enemies have hopes and dreams of their own, and do, in fact, have reasons for what they do. 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.