Tabletop role-playing games pretty much started with D&D. Later, Japanese RPGs started going on their own path in trying to bring the tabletop RPG gameplay to a computer. Western RPGs went a slightly different track, but the attempt was still to take tabletop gaming and translate it into a computer.
But when you say D&D is an RPG, you package a lot of ideas into that acronym. Here are some of them:
You create a character. You can choose whatever you like for your character's features, within reasonable limits. For examplem you can choose a race and class, name, gender, appearance, equipment, etc. But the game is not expected to create a custom class just for you because you want to play a Steampunk Detective.
You decide what your character will try to do. This includes dialogue. The referee (or the game programming) decides the outcome of the attempt. But he cannot tell you that you cannot try that action. The most he can do is accept that you tried to do it, but failed.
Your outcome is uncertain. Perhaps if you stand by and do nothing, the world will end. But you can choose to stand by. Or you can choose to try to save the world. But it's also possible that you can fail to save the world even if you try. If the outcome is predetermined and you cannot affect it, you are no longer playing a game. The closest such a "game" comes would be perhaps an "Interactive Movie".
If you remove any of these elements, you no longer have an RPG. You have something different, which may be valuable, but it must be classified as what it really is. A sports car may be a sweet ride, but it is not a jet plane.
Now I'd argue that today's computers are inherently unable to respond to any reasonable human request. For example, let's say you make a space shooter game where you fly sorties from space bases and planetside colonies in a sandbox environment. You include lots of different ships (maybe even a ship construction system!), various upgrades to the ship components, different weapons. There is cargo trading, market fluctuations, exploration, the ability to create your own bases and colonies, excellent AI wingmen, to the point where you can set up a little empire if you like.
But what if I want to play an engineer on a ship someone else (AI?) commands? The game can't do that, even though it's a legitimate expectation in the environment. Or maybe I want to play a drug dealer. Not a drug runner, which is just someone carrying illegal cargo. I mean going down to the colony and walking around on foot.
What if I want to play a doctor, and see what interesting things walk through the doors of the clinic? You'd need at least a detailed system for surgeries and medicines and diagnoses and such.
What if I wanted to play a repo man? Did the game forget to include mortgages on spaceships? Oops, guess that's one line of work you can't have.
And when a game leaves something like that out, it's like the referee at the table telling you "no, your character wouldn't spit in the Orc king's face like that!" It's my character, it's the role I'm playing, if I say I try to do it, then I try to do it. But in a computer game, you aren't allowed to even try it.
MMOs can be RPGs, just because the humans around you are able to respond to you on the fly. The game doesn't need to set everything up, it just needs to give you the tools necessary to do it yourself. The "game" becomes really a chat and math client for people to play with each other. But I'd call that an RPG.
A "game" like Final Fantasy has perhaps a dozen endings at most. Of those, many are clearly the "bad" ending. But a dozen outcomes is hardly enough. And your character is typically unable to do some of the most basic things, like running an inn or joining a monastery that brainwashes you because they're secretly a cult of the Rat God. See that rainspout on the side of that building? I sure hope you weren't planning on tearing that off and selling it for scrap metal, because it's an invulnerable part of the house model and there is no force in heaven or hell that will move it even one pixel.
Not to say those games can't be fun. These games, which I call Story Completion Games, can be excellent. Just like watching a particularly good movie can be fulfilling. But they are not RPGs.
I'd say that very few computer games are actually RPGs. We're starting to see it more lately. Dwarf Fortress is trying, and Roguelikes in general are very good at the attempt. But a creative player can always think of something he should be able to do but the game does not allow. Generally you don't notice because the game leaves those things out entirely, and you don't notice them. Toilets are one common example.