There are many different ways to construct a level so that the player behaves how you intend. In terms on a linear path it is very easy to only make the player see what you want them to see. But this comes with its own problems, keeping the player immersed and feeling that the game isn't unrealistically forcing them down a certain route against your will.
Loops are used to great effect in many games to avoid this disconnect and path a player.
A loop is a layout element that guides the player back to a previously seen or visited location. While it is still essentially a linear path created by the designer, it often doesn't feel that way. In fact, it is extremely useful in single player level design because of its linear properties. Why?
Illusion of Choice
Many games try to "empower" the player, who is often the main character and (supposedly) triggers most plot events. But single player levels are usually meticulously scripted and designed; divergence from theintended path can cause bugs or malfunctions. Sometimes this intended path is very blatant and obvious, which results in a very artificial feel to the level. The "designer's intentions" become clear and the game becomes a routine of jumping through placed hoops rather than genuine interaction. Loops can partially mask the intended path and make the level seem more nonlinear and spontaneous than it actually is.
In real life, we travel in loops all the time. Everyday, you may take a certain route to school or work, and visit these locations repeatedly. There are probably several reasons why you travel along this route, such as efficiency or speed of use. Loops can make levels seem more realistic by having players revisit locations and routes.
Levels can only be so large; time and BSP file format limits are large factors of the level design process. Making the player's path loop back to itself will save space, memory, and time. Would you rather design three small rooms that the player will visit for 5 minutes each, or one large room that the player will visit for 15 minutes? Loops can save resources and time for the author.
Overly Non-linear design can often be a bad thing. If players are given too much choice they might not know what to do with it, or find the layout confusing. However, overly linear design can also be a bad thing, as it can make progression feel fake, predictable and boring. A balance is generally the best approach; levels with choices that also give guidance in the form of in-game hints, other characters, signs, or other cues. Loops fit into this very well, they can make the player reflect on his past experience and re-evaluate his goals: "I remember I entered the level on that balcony over there, after fighting the helicopter." and through this guide the player back to the intended path and indirectly remind them of their objectives while also allowing for a degree of non-linearity along the way.
At certain times, loops are wildly inappropriate. Use them with caution, as they can backfire. For example, the vehicular sections of Water Hazard and Highway 17 chapters of Half-Life 2 would lose all significance if large portions were composed of loops. The goal of these chapters is to elicit a sense of progress and movement away from City 17 - essentially, a virtual "journey" of sorts. Having the player drive hundreds of miles, only to end up on the other side of a locked door encountered earlier, will more likely frustrate than immerse the player.”
When looking at more open/ free roaming games, like skyrim. They employ different techniques in keeping the player seeing what they want to see. The larger issue with free roaming games is that you're not restricted to where you can go, meaning that every asset has got to be to a certain level of detail otherwise the immersion will be broken. To overcome this games like Skyrim use modular level design. This means they use less different assets, so that the ones that are used can be at a higher fidelity to build the level up.
These are only 2 ways in which level design is implemented to giving the player the most immersion but through two very different ways. Keeping that interactivity and connection to the player is ultimately the main goal in level design and is done differently between platform, genre etc. but without such would stop any game from working and would lead to misdirection towards anarchy. A total failure, that is why it is so important.