Adventure games, the granddaddy of escape the room games
In the late 80's and early 90's, one of the most popular genre of games were adventure games. These point and click adventures had you controlling a character by clicking on the environment and giving commands on how the character should interact with objects or characters. The character would then move and/or perform the command. The game ran on a script of what needs to be done in what order. The goal was to figure out what the game needed you to do next to progress. This sometimes would involve picking up an item like a key and using it on an object like a lock. There were usually a set list of actions you could perform on an item or object. For example, you may be given the choice to eat, look, use, listen to, drop, and give any item in your inventory. If you came upon a locked door, you may want to USE the KEY on the LOCKED DOOR. Some of the combinations of items and actions were quite humorous. At what point in the game would you ever need to EAT the KEY or LISTEN to the FLOOR? Most of these weird action commands would cause your character to make some snarky response back to the player. I do not know how many times I got "I cannot eat that!" back from my character when I commanded them to eat something stupid. I would usually use that command first when I picked up a new item just to see the reaction. Half the fun of these games was to find the hidden responses to these funny commands.
These games were usually pretty long. Finding the right order of doing things in took many days. Most of the times, the games had a rich story. The reward for finding the right progression of actions was usually a small scripted sequence that furthered the story. The puzzles in the games for the most part were logical, but there were some serious WTF moments some sociopath game designer threw in to make you hate your life for a few days trying to figure out. Let me remind you, there was no internet back then. There was this one puzzle in King's Quest that required you to throw a pie at a Yeti to defeat him. That's logical! These games slowly faded from glory as computers and home game systems became faster and more advanced game genres emerged.
Rise of the Escape the room genre
The internet quickly brought free software distribution channels into the home and it quickly became the go to form of entertainment for millions. This is when Flash, as a game medium really started to become popular. I started creating games on Flash when it was owned by Macromedia. The web was a totally different medium than traditional PC gaming. The games needed to load quickly and there were no way to save progress easily between plays. This meant that traditional adventure games did not work well on the web. Nobody wanted to spend 6 hours on an adventure puzzle only to accidentally hit the back button and lose everything! Game developers had to adapt to these new constraints. One way was to make games that were light on story, animation, and small in size. These constraints brought about lighter versions of action games, strategy games, and adventure games. These mini adventure games had to be brief, light on story and characters. The escape room game genre fit these limitations and provided the fun parts of adventure games, in small puzzle solving chunks.
The early games in the genre were mostly in first person perspective, in a small cramped environment and had no character interaction. This worked out great for the medium and the games proliferated. I was introduced to them when I first played a game called: Mystery of Time and Space. After this game popularized the concept, many other games came out that refined what we now call "Escape the Room" games. Some of the most notable games being:

Mystery of Time and Space (MOTAS)
This is one of the first games to use the term "Escape The Room".
Crimson Room
One of the best known escape room games. The 3d transitions between scenes was pretty slick back then.
Viridian Room
The official sequel to the Crimson Room. This game upped the creep factor.
Submachine Series
One of the best escape room series on the web. These games had many rooms and basic puzzles
I fell in love with the genre. They provided all the fun of traditional adventure games in small bite sized packages. They did not really have any story to them, you always seem to be locked in a small space and have no memory of who you are. That was super convenient for us game developers. No memory means no backstory. Being locked in a small space means no need to draw tons of environments. Being trapped alone meant no need to design non player characters with any personality or interactions. To a game developer, without the complex game design elements, we could focus mostly on the puzzle design. That was always the fun part anyway! These games are fun and easy to make!
When I first heard that escape the room games were crossing over to the real world, I was excited. There were none that I knew of in the US for a while. I really did not think they would catch on here. Slowly a few started popping up. I had never even thought about starting one until I visited my first real life escape room game. It was heavy on finding numbers to padlocks on boxes with a forgettable story and no room design at all. It was everything the flash games were, nothing more. I got the bug to start one that night. Game designers built flash games minimally because they fit the medium and were easy to make. Live escape room games don't have to be light on story and lacking immersion. They can be more than number puzzles and padlocks. I wanted to bring back the adventure our flash games minimized because of bandwidth constraints. We do not have those limits in the real world.