I remember a few decades ago an argument broke out at the table between player and DM about how the price in gold for food, weapons, armor etc. was unreasonably unrealistic and something along the lines of how looking at the average income for different NPC trades in the DMG vs the prices paid would mean no one in any town would actually be able to afford to live even on the barest of essentials. The DM eventually laid it to rest by saying something along the lines of, those by the book prices are a sucker tax used by locals to rip off rich looking out of town strangers.