You'll get a number of answers here.
You will get the "Tolkienists," who insist that modern high fantasy traces its roots back to J.R.R. Tolkien and his works, and you will get those who deliberately seek to find evidence against such a narrative, citing pre-Tolkien literature that contains comparable elements of fantasy.
In a sense, fantasy exists in a larger patchwork of medievalist fiction in general. Many of the same non-magical tropes exist in Tolkien's works that had been present in Sir Walter Scott's Ivanhoe, for example. That is not to say that Tolkien and other modern high fantasy writers exist on the exact same literary plane as writers like Scott, but that medievalism has existed as prominent genre of Western literature for quite some time.
However, the elf-dwarf-man skeleton of fantasy literature does owe a great deal to Tolkien, and Tolkien was a medievalist by training. He taught linguistics at Oxford, and his passion for Anglo-Saxon and Norse cultures are present throughout his literary works. He is known for his scholarship on Beowulf -- his prose translation was released last year -- and he wrote a number of other works based on medieval literature -- see The Legend of Sigurd and GudrĂșn and The Fall of Arthur.
He and C.S. Lewis, with whom he had a close relationship, contributed significantly to the foundation and popularization of this genre of fantastical fiction that existed in the medieval world. That is the caveat here -- high fantasy authors did not sit down and look to find a world for their fantasy lore, eventually settling on a caricature of medieval Europe (this seems to be the presumption of your question). Tolkien and his peers set their fantasies in the context they loved, and later writers, either sharing a passion for the Middle Ages or seeking to emulate the overall textures of The Hobbit and especially The Lord of the Rings (due in some part to the success of Tolkien's works) adapted these styles to their own works.
As a final thought, it bears mentioning that categorizing any creative production depends both upon the intentions of the artist and upon those who consume the production. In other words, modern authors who include medieval tropes in their high fantasy productions are, on some level, either unconsciously or deliberately seeking to create something in the vein of that genre. Likewise, those who read that book are participating in constructing the more general conceptualization of that book by finding reasons to qualify it as part of that category. Eventually, just as in any art form, certain elements become essential to creating something in a certain stylistic genre. Just as we expect punk rock to include guitars, so too has medievalism become essential to high fantasy. Likewise, exceptions exist, and creative producers often seek to challenge these expectations.
The point is this: it is not creative laziness that modern high fantasy writers continue to incorporate medieval elements in their works, nor is it that they seek solely to emulate the likes of Tolkien. They seek simply to exercise a creative consciousness that originates at the intersection of influence from preexisting works and of a desire to express passions that may have been similar to those held by Tolkien and his ilk.
Edit: I edited a few sentences for clarity.
The modern fantasy genre includes many sub-genres that are not overtly medieval. Among the more popular ones are vampires, zombies, super-heroes, Indiana Jones, and many different takes on the space opera. For instance, Star Wars takes far more from fantasy tropes than it does from science fiction. Similarly, the magical elements found in Pirates of the Caribbean places it much more in the fantasy genre than in the sword-and-sail genre.
The specific sub-genre of High-Fantasy (epic tales situated in an alternate world) has been dominated by medievalists mostly because it was largely invented by a group of Oxford medievalists, in particular J.R.R. Tolkien, C.S. Lewis, and William Morris. Subsequent authors have largely mimicked their story telling methods.
The reasons for the early success of these medievalists probably relates to a general revival of elements of the medieval aesthetic in the 19th Century, including neo-Gothic, Arts and Crafts, Romanticism, and other movements. The architecture of the mid- to late-19th Century is quite fantastical in the way it references a middle ages that never existed (example, example, example). In this setting, medieval characters and stories found new life, revitalizing the Arthurian legends, the fairy tale, and giving birth to new genres such as Gothic horror.