Note: We had a very similar question on Writers.SE; I'm cross-posting my answer from there, adjusted to your specific question.
I think the reason for the popularity of the trilogy structure in the fantasy genre is simply that fantasy novels tend to be long. This occurs for for many reasons, including:
- Fantasy novels typically require lots of world-building exposition, explaining the setting, the mechanics of magic, central factions in the world, etc. etc.
- Fantasy novels are often interested in exploration; showing off various fantastical elements (places, creatures, magic items...) is often a lot of the book's focus. So the narrative is designed with a lot of shifting from place to place, and introducing new elements very frequently.
- Fantasy novels often have epic plots, about the rise and fall of kingdoms and dragons and deities. Epic plots tend naturally to be of greater length, because this gives both time and wordcount to properly build up this epic scope. Readers will probably not care much whether the Empire of Lime can defeat the Bespectacled Dragon unless they've gotten a sense of all these elements as being rich, intriguing, and with real substance.
Since fantasy tends to expand into great length, multi-book structures are necessary. The moment that's a given, trilogies are a natural choice -
- it's a short, well-defined series;
- that's a length fantasy readers will be willing to risk dipping into;
- the three-book structure can, in many senses, duplicate the three-act structure;
- it's a short as you can get besides a duo (which - maybe this is just me - feels like an awkward length, which needs to work harder to justify the split into multiple books, and is harder to structure a single narrative around).
In other words, trilogies are popular because they're "short" (compared to longer sagas), not because they're long (compared to stand-alones). I think you'll find that stand-alones are actually easier sells, both to publishers and to readers - they'd much rather buy/read something complete, self-contained, and non-risky. It's simply that such books are less common, particularly when a lot of genre fans are interested in fantasy specifically for the length-inducing elements I've mentioned (world-building, exploration, epic plots).