Honestly, that is a pretty poor job of DMing if you drive someone away from the game for doing something they thought was a good idea...
At the very least, the DM could easily avoid the TPK simply by saying that the ship has a failsafe safety system in case the cockpit controls were damaged. Considering we are talking about Star Wars tech, that isn't unreasonable at all. Actually, having a random grenade toss be so lethal probably goes against the rather reckless spirit of many of the battles in the Star Wars movies...
Ultimately, it is the job of the DM to let the players have fun, even if their idea of fun is a bit different than yours. This is particularly true when playing with people inexperienced with the game. It is always better to let someone be excited about a style of playing they bring to the table, rather than force the table's style of playing upon the player.
On a totally different topic... I outright reject the idea that books are somehow more related to the D&D experience than videogames. At the core, books, like movies and television, are totally passive and linear experiences, that convey story but have no other element. Videogames and tabletop RPGs are at least both kinds of games, so they share far more in common with each other than they do with books or films. At the same time, tabletop RPGs and (many) videogames tend to both have stories and plot, so they resemble each other more than they resemble classic boardgames like chess or go. The concept of plot is alien to chess, and the idea of class mechanical balance is alien to a book, but both are essential to both D&D and many videogames.
Of course, I must make the disclaimer that there are countless videogames, such as Tetris or the visual novel genre, that might fall outside of the above statement, but that is not generally what people are talking about on these boards, so...