If relative locations matter to your work, creating a map is a good idea, even if it’s just for your reference and never published. We seldom see a map of ships, lairs, or dungeons in stories, suggesting authors might avoid this without complaint from an audience. Gamers and game designers might benefit from such maps, as the audience’s characters will need to navigate through the locations. For readers, a map could be quite beneficial. My own experience in reading about someone’s journey through a dungeon, castle, or similar labyrinth is that I have little to no understanding of where they are. Maybe the characters don’t either, being lost, but these scenes often lack orientation.
Even if we don’t show a map to the audience, it’s crucial to accurately convey the layout we’ve envisioned. Otherwise we can describe a series of twists and turns that doesn’t make sense to readers with a strong sense of direction. This can be one reason to be slightly vague. Rather than writing that a hallway turned left twice and then right once, we can say it turned to one side twice and then the other, but to some people, that’s worse.
One reason for a map is to determine what rooms exist and what’s in them. This can be problematic; few of us understand how a dungeon is laid out, assuming there’s a standard way, and we might have trouble assigning a purpose to rooms. Some room examples are cells, guard stations, weapons rooms, torture chambers, latrines, pantries, mess halls, and visiting areas. Depending on the setting, some might have a library, laundry area, kitchen, a mini-hospital, anti-magic zones or cells for wizards, bullet-proof rooms, or areas where prisoners are forced to do hard labor (of various kinds). Think of modern prisons for ideas on room types and potential layouts, including security zones for different levels of dangerous prisoners. All of this matters because of the tradition of adventurers exploring such a place and finding monsters and valuables in various rooms, with some sketchy justification for these things existing where they do. Some thought can raise our dungeon above the competition, and having a map can give us ideas.
In SF, maps of a ship could be invaluable as a reader because explanations can be difficult to visualize, though it may not matter for your story. When I watch TV, I seldom understand where parts of a ship are in relation to each other, but characters typically solve this for me with explanations like, “We have to crawl through this tube and up two decks to reach engineering.” To write things like this, we’ll need to remember our layout, but that may not require a map. We could just jot down what deck everything is on and whether it’s fore, aft, port, or starboard. For example, engineering might be aft, port side, deck 5 of 20.