There is a hell of a lot of work to writing a good RPG. Not only does the backstory need to be good, but so do these massive pages upon pages of character dialogue. Every character needs a detailed history and personality. And then there's these endless, hundreds and hundreds of sidequests. Sidequests totally unrelated to the main plot typically make up the majority of American RPGs. Each one needs its own engaging to story and characters to hold the player's interest. If they're just generic quests that don't give the player a reason to want to finish them besides a generic reward of exp or money, the game will not be good no matter how deep the overall story is. The sidequests become to repetitive, and the player gets bored.
The best example I can think of is Planescape Torment again. Every sidequest felt important somehow. Each was unique, and had a unique and engaging subplot to go with it. One quest actually involved you simply walking from one end of a small area to the other and back again to deliver a message between two people. Somehow it was still interesting, and though there were ten or twenty quests almost exactly like this, they each felt unique. That's my idea of good writing in an RPG.