In any RPG combat system involving damage and health, RPG characters can be boiled down to a single number representing their “power rating”. This is the character’s overall ability to succeed in combat. In systems based on health and damage, RPG characters are just math. There are no indeterminate numbers, and everything is finite. There may be many variables, but each variable only has a few possible values. Therefore, an exhaustive search using computer algorithms can optimize the variables. This may be hard to do depending on the game, but it is always possible with enough work.
Powergamers in tabletop roleplaying games have been doing this for years. In video games it first hit with Starcraft 1 but did not get popular until World of Warcraft. Hardcore players wanted an advantage, so they started theorizing how some of the stats and abilities worked with math and simulation. They then tested this ingame to see whether the theories were correct or not. Overtime, Blizzard Entertainment affirmed various theories as correct, turning them into fact (or law). This came to be called theorycrafting.
From theorycrafting with World of Warcraft came the terms Damage Per Second (DPS) for Damage Dealer classes, Healing Per Second (HPS) for Healer classes, and mitigation (or survivability) for Tanking classes. By calculating DPS, HPS, and mitigation, the optimal items and abilities could be found. This came to a head with Gearscore, an add-on that calculated the relative value of all the items a character was wearing and converted it into a single number representing their overall power gained from those items.
The huge interest in World of Warcraft made theorycrafting and Gearscore ubiquitous, but the same ideas can be used and has been used in other RPGs. Dragon Age with its MMO-like character roles easily adopted much of the same theory, and the community was able to create optimal builds for each role. The same concepts can also be used for RPG hybrids like Mass Effect.
Usually it will be about doing the most damage, but in some cases tanking ability is desired. In Diablo 3, characters have to both damage and tank monsters. The community came up with Effective Health, a number representing a character’s overall survivability. Blizzard also included DPS in the stat screens and a Gearscore-like item comparison system.
For games based on Dungeons & Dragons (D&D) rules, like Neverwinter Nights and Knights of the Old Republic, it is easy enough to adapt the tabletop powergamers’ strategies to the computer game. The D&D combat system is much more complicated than most games, but hardcore players could optimize the entirety of it with enough time and interest.
The only exception is in games with incomplete information. If you do not know how much damage a weapon does, you might not be able to compare it with other weapons. Likewise, if the game features random enemies with radically different tactics required, you cannot know the best items or abilities ahead of time. In these cases, it turns into probability; you have to predict how to prepare for the future. Very few RPGs do this; they are usually criticized for hiding game mechanics.
One false exception is player skill. It would seem that good player skill with a badly optimized character can trump bad player skill with a well optimized character. This is true, but in situations where this matters (Player vs Player), players will always strive to give themselves an advantage. Once a player reaches their skill cap, the only way to improve is optimizing their character. Optimization which gives birth to theorycrafting and eventually power rating (Gearscore).
There are many RPGs in which the community has not gone into theorycrafting and optimization. In single player games it is usually easy enough to complete the game without theorizing anything. Players could optimize their characters, but there would be no reward or necessity to do so. It is really in multiplayer games where competition between players directly (PvP) or indirectly (getting on the raid roster) causes players to optimize their characters to a single score.
All this is just to say not to get angry when “gearscore” or theorycrafting comes up in your favorite RPG. If it is popular enough, there will always be people looking for an edge. I see many discussions, especially in MMOs, where players claim that Blizzard and WoW ruined everything because of gearscore. The truth is gearscore was always there. There just was not enough interest by the majority of players to concentrate on it. A hugely popular game like WoW came out. It was simply inevitable that players would find the optimal paths.