I find this most true is classic JRPGs, but many RPGs stick to this formula: The closer you get to your final goal, the more everything costs.
Now basic necessities of life would obviously cost more in these more treacherous places. But charging 500 gil to sleep on rug while 10 gil can get you a room in the royal palace doesn’t really make a whole lotta sense…I guess except to the guy who’s ripping you off for 500 gil to sleep on his rug. I bet when he doesn’t have guests he just lets the dog sleep on it. Probably pisses on it too…the dog, not the innkeeper.