Here are some wing shots on the definition of fantasy literature, typed in no very systematic order and with no attempt at justification.
The sapient races are part of the secondary world and serve to simplify society by dividing it into easily identified castes with stark differences and formalized relationships. They also help the reader regard man as one species among many in a rich, diverse world.
The secondary world is part of an affective structure operating on an existential level. Fantasy aims to help the soul take stock of her own ambient reality, helping her to perceive and appreciate things as they are in themselves. It is Escape and Recovery in that it enables her to escape from the prison of familiarity and to recover herself and the simple things of life. It is the opposite of the White Witch's bad magic food, which ruins the taste of good, ordinary food.
Style plays a crucial role in this structure. An unfitting style results in a flat fantasy. The point isn't that trees are flat in fantasy if not properly described, for flat trees figure in many good "literary" novels. The point is that flat trees simply are not allowable in fantasy as such. Fantasy is literature in which we care about the trees.* For this reason and others, fantasy is a fully incarnational art. The tale cannot be divorced from the telling any more than a man's soul can be divorced from his body.
The objection to "messiness" above is not to say that fantasy is somehow "tidy" in the Disney sense. It also differs from fairy tales and myths and epic romances through its meticulous naturalism, which at times devolves into slum naturalism. It is more akin to the Divine Comedy or Don Quixote than Orlando Furioso. It places the reader in a fully realized environment.
Fantasy often arises as a metaphor for an author's system of belief or philosophy, but it is diametrically opposed to allegory, and its elements quickly acquire a life of their own. They serve as an embodiment or living incarnation of transcendant propositions. The system of belief is but a material element, and one needn't share it to enjoy the work. In the end it feeds into the affective structure: the reader "believes" whatever the book presents as true, within the context of the secondary reality. Fantasy in which propositions gain the upper hand (as in Perelandra) ultimately fails. On the other hand, fantasy lacking a substantial purpose or underlying philosophy runs the risk of silliness or frivolity.
* "Very little about trees as trees can be got into a play." From Tolkien's "On Fairy Stories."