My friend Randy brought an article to my attention:
Why Fantasy and Why Now by R. Scott Bakker
We commented back and forth a bit on my last post, but I had a lot to say on the subject (surprise surprise) so I thought I'd take it to a new post.
Mr. Bakker seems to be mainly talking about fantasy written since the Enlightenment period, but there's been fantasy prior to that. But I do agree with his comment about wish fulfillment in a modern scientific society and defining good and evil. Science can't do that.
While science can tell us the "what" about nature (meaning life, the universe, and everything), it doesn't tell us the "why."
I don't agree that fantasy is a rival or even a companion of religion, at least not in the sense he means. Fantasy, I think, comments about human nature, human culture, and how to rise above those things. It allows us to stand apart from our real world (by substituting a fantasy world) so that we can see and evaluate as an outsider. The struggles depicted in fantasy stories are basically the same struggles in real life, but they are filled with symbols or archetypes that stand for real things.
You can view a fantasy novel as a model for a real struggle. You can study it, learn from it, be inspired by it and take that experience into your real life. And because it's all symbolic, it's a model that can work for many people who lead vastly different lives. This is the reason myths and legends are so readily passed down through time and from place to place.
For more on this topic, I recommend Tolkien's essay "On Fairy Stories" and Joseph Campbell's "The Hero With A Thousand Faces."