A lot of fantasy stories have a den of evil, some location that the characters travel to where all of the baddies and dark magic resides. It's a good way to separate that evil from the good of the rest of the fantasy world, and it provides a sort of end goal for the characters to work towards. Not only do they usually have to venture into this area to complete their mission, but getting there in the first place often requires that they build their skill set and get stronger and more confident in their abilities, so it also allows for some character development.
Mordor in The Lord of the Rings is obviously one of the prime examples of this, and was likely the blueprint for a lot of fantasy that came afterward (as are many other elements of the LOTR books). Mordor is Sauron's headquarters, and it's where most of the evil in Middle-earth comes from. But was this part of the land always so corrupted? What makes that specific part of Middle-earth so perfect for Sauron's dwelling, and why does it stand out so much from the rest of the world's landscapes?
LOTR: Questions About Middle-Earth That Tolkien Never Answered
There is a theory that Mordor's formation was a result of the devastation that Morgoth brought to the land, and its landscape was formed by huge volcanic eruptions, but there is not a lot of evidence to support this. The more accurate picture of things is likely that this area of Middle-earth used to be covered by water and was once the Sea of Helcar, but during the First Age when the shape of the world was changed by the Valar, the water disappeared. However, the mountains were left behind as they were a result of underwater volcanic activity (so the volcano portion of the earlier theory still comes into play). There
Read more on gamerant.com