Games are not stories. Games can come chock full of story elements like plots, characters, and dialog, but they're inherently different from stories. In games, the players control everything. In stories, the writer dictates everything that happens.
Games consist of events though - turns, rounds, attacks, defenses, victories, defeats. If you string enough events together you can start to see a pattern form among them. As humans, we recognize patterns, and we build narratives out of them - stories.
Stories help us boil down context to its essential bits. They deliver importance to our actions, both in real life and games. They help us care about what we're doing and about what's happening around us. It's natural that we find stories in our games. Once a game is over, we tell what happened, and we select the most interesting elements to create the most compelling narrative, just as if we were creating a highlights reel of the game.
Some games inherently create more intriguing stories than others. It's a lot easier to find a narrative hook in Mass Effect, for instance, than in Tetris. The more sophisticated the game's structure, the clearer the potential for great stories becomes.
Roleplaying games can make for particularly good stories. They already come with most of the elements of great tales: heroes, villains, epic backdrops, explorations and revelations, and much more. That's all you need, right? Clearly not. If you've ever had to listen to a poor storyteller ramble on about his RPG character in excruciating detail, you already know that. Just because someone hands you a truckload of bricks doesn't mean you can figure out how to construct a wall, much less a castle.
That doesn't stop people from trying though. Bookstores around the world have shelves dedicated to gaming novels. Comics stores sell licensed comic books. Movie theatres regularly feature films based on games too. Hasbro has even licensed the production of a film based on Battleship, a game that has very few elements around which to structure a story - but that hasn't stopped Universal from giving it a shot.
A sharp storyteller can find the narrative in a grocery list, and games give up far more than that.
For now, let's focus on the most common kind of commercial gaming stories: fiction. Game publishers often turn to skilled authors to recast their games - or the worlds in which they're set - as gripping narratives. They do this in two ways and for two reasons.