Anyone who has ever played an RPG has been there: You're halfway through the game and you've already got enough cash to outright buy the kingdom, city, or planet where your adventure is taking place. Either that, or the people you're saving are hateful, opportunistic jerks who, upon seeing you stagger back into town all scorched and smoldering from defeating the dragon that was menacing the town, will quadruple what they're charging for burn salve. Every RPG economy seems to be bent or broken in some logic-defying ways, to the point where it doesn't make sense, annoys the player, or it ruins the game balance.
But why? Can't some bright game designer just, you know, buckle down and write a decent in-game economy? Is that so hard? KOTOR, Oblivion, Fallout, Diablo, are all fantastic games and I love them very snuggly kissy cuddly much, but they all suffer from a case of hilariously broken in-game economy. (Although each one is broken in a different way.)
Well, let's look at the problem. Let's assume we've got some game where you travel around and defeat bad guys and get better gear as you go. Perhaps some leveling up and side-questing, too.
* We want to allow the player to loot bad guys. It's really frustrating at the beginning of the game if you have to fight a guy who is wearing fancy-pants armor and wielding a flaming sword while you're still running around in a tunic and swinging a stick, only to have your vanquished foe and all of his gear fade into the dirt when he goes down. It makes the game feel unfair and arbitrary. If you defeat someone with a better weapon, you should get it.
* We want the player to be able to sell the gear they collect. Managing resources and collecting "treasure" is a big part of the appeal of these games, and leaving out the trading means leaving out the fun for a lot of players.
* We want the shopkeepers in the game to pay reasonable prices for gear. It really is obnoxious to be the hero of the realm and have an NPC offer me three copper for my unicorn horn and turn around and charge me ten gold for a bent, rusty butterknife. It makes the characters in the game seem selfish, greedy, and opportunistic, which is bad since we're generally supposed to care about them and want to help them.
* We want shopkeepers to be able to do business with the player. Some games put a cap on how much value a shopkeeper can handle in a single transaction, or they give the shopkeeper a small pool of money which is replenished every few in-game days. These are intended to stop the player from unloading their entire haul in a single transaction, but it's easy to exploit around these limits. If you want to sell all of your violently attained swag, you have to wait for their money to refill several times, or unload big-ticket items through a series of complicated trades. This limitation just encourages boring behavior. You must then choose between having fun and acting rationally as a character.