Many adventure games use locked doors to keep the player out of certain area's until they have completed earlier parts of the game and obtained the key from where it was hidden, or from another player.