It's very easy for any programmer to create an RPG game that includes all the mechanics of an RPG. It's quite another thing for a programmer to create NPCs that have the flexiblity and variety of a human DM.
So why is it so easy to perfectly translate one aspect of RPGs to computers while others remain practically impossible? I'm glad I imagined that you asked.
Well...
RPG mechanics are written in form common to almost programming languages, and it's common to programming languages because a program does what RPG mechanics do. All a programmer has to do is look at an RPG rulebook and directly translate the mechanics to the mechanics of a programming language
.