Screw the guy who blasts through the undead scourge and penetrates the deepest levels of the sewers to save the president's daughter. We want to know about the guy who's so badass he beat us there and set up an item shop and shooting gallery. And hey, if he's so good at getting around, why doesn't he save the president's goddamn daughter, huh? And, couldn't he find an area with a wider customer base?
Many of the shops hidden in the ruins of La-Mulana are hidden behind walls. Some just sell ammo, but others (including one Guide Dang It example) sell vital and otherwise unobtainable Plot Coupons, though they don't come cheap. The shopkeepers tend to be undead, and say that you're the first customer in hundreds of years.
The dungeons of Spelunky have, besides the ordinary emporiums, gambling parlors, kissing booths and the super-secret Black Market. The shopkeepers are tough and well-armed, as players may find out the painful way, meaning that it is actually reasonable for them to have made it through the dungeons. That still doesn't explain why they feel the need to serve the vast customer base that typically appears miles underground. Or why they don't just grab the gold lying around themselves.
Hammer sets up shops like this in the Castlevania games. Seeing as how he's a former military man and is seen with a bazooka at one point, it's fair to assume he can take care of himself.
The Castlevania 64 games have a shop master that appears with the activation of a scroll. Just don't get TOO greedy...
The Camp Gay brothers in Shadow Hearts: Covenant show up almost everywhere. They lampshade it in the Neam Ruins; when you talk to them, they bitch about having had to go through all the puzzles to get that far and demand you make it up to them by buying their goods. (They also offer you a ride out in their van.)
Most roguelike games have sections of dungeons that contain items for purchase. Try to leave their store without paying, however, and you'll face some very nasty consequences.
Played with in Desktop Dungeons, which has single-item shops. "After you make your purchase, the mysterious shop mysteriously disappears. Mysteriously."
The Kecleon shops in the Pokémon Mystery Dungeon Games. Possibly justified by the fact that they're always at ridiculously high levels and will most likely kick your ass if you steal from them.
Can be done, however. Requires a Pure Seed or a Trawl Orb depending on where you are in the level. One teleports the eater straight to the stairs, the other drags every item to you.
Brax the Salesdemon from Dungeons of Dredmor almost makes sense. Being a demon, he can summon Debt Collectors (more demons), which explains why monsters don't dare attack him. Also, most civilians probably wouldn't buy merchandise from a demon, even one with a suit, so he just markets his stuff for adventurers who find his shops.
One long dungeon in the first Phantasy Star game contains... a bakery, in which you must buy cakes and return them to town to progress the story.
One dungeon in Shining Soul II is actually a house and storefront that you are asked to infiltrate by the Hub Town's storekeeper. The entire purpose of going there is to secret-shop so that the storeowner can compare prices and undermine her rival.
There are in-game examples in the Mana Khemia subseries: in 1, there's a student-run store in the Student Resource Center dungeon, and in 2, the person selling stat-boosting items is found in a dungeon. It's justified by the fact that at Al Revis, sending teens to face a dungeon full of monsters is a perfectly normal homework assignment, and anyone with so many stat boost items that they're selling them likely doesn't have to worry about random encounter monsters.
The Cat Girl Koma in Super Robot Taisen: Endless Frontier games has a habit of setting up shops in the middle of dungeons, although depending on her mood and current employer, she might want to fight you first. Justified in the first game due to her being a competent fighter as stated above and in the second game, she's travelling with you. She almost gets left behind after temporarily seperating from the rest of the party to peddle her wares when the Load-Bearing Boss's defeat takes effect though.
These are a staple of the Final Fantasy series, first seen in Final Fantasy II under a waterfall in the Jade Palace, and last used in Final Fantasy XII in the Necrohol of Nabudis - where one of the monsters is a shopkeeper. Final Fantasy XIII gives access to shops through every save point, and scatters said save points everywhere. Worse, even, Final Fantasy XIII-2 replaces the old save point shops with Chocolina... a feminine humanoid thing that can just pop up anywhere in the space-time continuum, including the middle of a warzone, and sell you stuff with a smile and lots of chatter.
Chocolina is justified, however; she is Sazh's chocobo chick, who asked to be of help in some way. Etro responded by making her humanoid, giving her the shop, and scattering her across all time and space, effectively meaning she literally is everywhere at every point in time to help Serah and Noel.
Final Fantasy X-2: There are times when Barkeep will run into a room of a dungeon and offer to sell you items, usually stationing himself at the last save point before the boss of the area. Anything to help Mish Yoona.
Neko from Secret of Mana would sometimes pop up in dangerous places, like a forest infested with monsters.
Playfully avoided in Jade Empire: the main character has (from a very early point in the game) a personal merchant spirit that constantly follows him/her from the spirit world, making sure that you will always have access to a shop-full of magical goodies wherever you are.
In Xenogears, a couple of dungeons had shops run by Fixbots; one could choose "I don't trust you" when talking to them, leading to a fight...but doing so would (obviously) remove the shop, seeing as you just killed the owner.
In the second game's Pit of 100 Trials, there is a random chance of a shopkeeper appearing every 10 floors.
Mario & Luigi: Partners in Time has Monty Mole's Mole Mart, which is not just in a dungeon, but hidden in a dungeon. And Fawful's Bean'n'Badge, which is in the castle sewers (counts as a dungeon, since they're swarming with Goombas).
Mario & Luigi: Dream Team has them in every dream world in the game except Dreamy Somnom Woods. Including Bowser's dream in the final dungeon. Oddly enough, they're always manned by the dream versions of the people you meet nearby in the real world, so that means Broque Monsieur in Dreamy Pi'illo Castle and the final dungeon, Britta in Dozing Sands, the tour guide in Wakeport, the Massifs in Dreamy Mount Pajamaja and Broque Madame in Dreamy Driftwood Shore.
Dark Souls likes to place its vendors in hostile environments: Andre of Astora may not be in a dungeon, but he's mere meters away from a fierce Titanite Demon; Shiva of the East can set up shop in Blighttown's poisonous swamp amid pestilence and toxic terrors; and then you have Vamos operating a forge in the darkest depths of the Catacombs, though technically, he is among his own kind and probably doesn't want too many visitors anyway.
Played with in Dragon Age: Origins. During the "A Paragon of Her Kind" quest, the PC will encounter a dwarf named Ruck in the Giant Spider-infested Ortan Thaig. Ruck is deliberately hiding out in the ruins of the thaig and has become tainted from eating darkspawn flesh. Provided you don't kill him, Ruck will trade you items that he scavenged from the ruins.
Then in the Very Definitely Final Dungeon, literally two rooms before the final boss, you find Sandal, standing hip deep in Darkspawn corpses and with his father's full inventory available for you to load up. The game allows you to express your disbelief and demand an explanation, which is of course just answered with "Enchantment!"
Dragon Age: Origins – Awakening features yet another salesman in a darkspawn lair. At least this time, the guy explains that he has an agreement with them to bring them supplies. You can convince him to move his business to your castle instead.
Not only does Sandal do that again in the Dragon Age II endgame, but he also helpfully hauls your own party storage chest all the way to the final dungeon.
There's only one of these shopkeepers in The Haunted Ruins, but she keeps showing up lower and lower down. As she does, her sprite slowly shifts (and she keeps insisting that the change is all in your head.)
Series/Persona has several examples in each game. There's a door to the Velvet Room in some dungeons in Persona 2 and Persona 1, 2 and 4 have NPCs in dungeons that will heal you for a pricenote Trish the Pixie and the Fox heal you for Ą100 per HP/SP. You can get a discount from the Fox through the Hermit Social Link, though. Trish, however, is stated in-universe to be conning you because she was so greedy about money and forced to watch over the healing spring. Since she turned it into a shop...
RuneScape has several "Wilderness Merchants," shopkeepers that wander through various parts of the Wilderness, selling capes. Said Wilderness is the only place where players may kill and loot other players, and is potentially the most dangerous standard area, depending on who you run into.
There's also a general store called "Bandit Duty Free" in the Wilderness; the shopkeeper can buy and sell at better prices, due to a lack of taxation.
Outside of the Wilderness are "roving bankers," who exist in various far-flung areas. Don't ask how they manage to transport your stuff from your bank account....
While not particularly prone to appearing in proper dungeons, wandering merchants can appear in Fallout 3 and Fallout: New Vegas. In the latter, they have established trade routes that take them through some of the more dangerous areas of the Mojave and occasionally pit them against some of its myriad threats. It's not uncommon to exhaust yourself fighting a den of nightstalkers in a canyon, then turn around to find a merchant caravan behind the next rock, ready to sell you food, ammo, and stimpaks (at a price). Wandering merchants are not particularly powerful fighters on their own, however, but they'll usually travel in numbers and often have much better armed mercenary bodyguards accompanying them.
Might and Magic X has this, with a trio offering various services near the entry to the final dungeon, which is itself within a dungeon. How they got there is made clear, though it does make it odd that the two who sell stuff has any stuff to sell (they were prisoners until you liberated them, and had been prisoners since before the game started). The The Falcon & the Unicorn DLC has another example, but in that case it is fully justified and a part of the plot of the quest — the shopkeepers are a few specific prisoners in an island fortification, given leeway by the guards because they can get stuff the higher-ups in the prison administration can't or won't provide, and because they can't escape anyway (unless they learn to breathe water, which they can't). They get their supplies by contacts with naga, who, being able to breathe water, can get in and out.
Forgotten Worlds presents us with Sylphie, the Arms Dealer with the shop which literally comes out of the ceilings/floors within enemy areas. One wonders how did she set up her shops that way...
Deus Ex: Human Revolution has a LIMB clinic semi-hidden within The Very Definitely Final Dungeon. Mostly Justified because the area only became a "dungeon" when an event caused most of the population there to go insane, and the shopkeeper managed to barricade herself. Transactions are all computer-based, which explains why the shopkeeper simply can't give you free merchandise. Still, it does come off as a bit silly.
In an earlier level, the player encounters some gang members willing to sell weapons and ammo - on the perimeter of a FEMA base/detention center. Though the gang members at least have the sense to set up shop where there are no enemy patrols.
In The Missing Link DLC, the player can buy weapons and Praxis kits from a shop in the middle of a Belltower base/detention camp. Somewhat justified, as the shop is also the base's official supply office, though it's noted that the shopkeeper also runs a black market side business and would otherwise not have access to such powerful weapons.
Averted by the black marketeers in the Alice Garden Pods, who do not stick around when Belltower raids the building.note They ultimately set up shop elsewhere in Hengsha.
In Wolfenstein, BJ Blazkowicz encounters a black marketeer just prior to entering the zeppelin hangar who takes time from looting supplies to offer BJ pick of his find. Somewhat justified by all the intelligence BJ has found ranting about supply thefts and black market infiltration, though the fact that it's possible to have multiple firefights within sight of the black marketeer still tends to stretch the credibility of this one.