This game mechanic is supposed to give a certain amount of realism and increase the interactivity of a game, instead of getting codes and using the action button in a keypad or a computer, we have to type the code / login and password to unlock a door or get access to a computer, this mechanic exists in games set at modern times up to more futuristic games, however it can happen that a game set in older times like steampunk games features this concept.
Sometimes we can hack
these devices through a minigame
, with an automatic hack item
or with our own acquired upgrades, the last case exists mostly in games with RPG elements
where hacking is a skill
or an ability.