What if this was part of a bigger idea, similar to the dungeon features ticket? Similar to how the new unique miniboss enemies work where you get a special message when you find them. 10% of the time a shop enters your view, it could have an event with an NPC leaving the shop either legally ("You see the Outlaw leave the shop with a shiny new Scroll of Identify") or illegally ("You see an Outlaw attempting to sneak out of a shop.... He's caught!" and non-Hostile thugs are summoned by the Shopkeeper). There could be other random events... maybe if you find a deep forge, there's a small chance of "You see a Chaos Dwarf mumbling to himself, attempting to forge an axe. Suddenly, there's an explosion!", and a WMoPC appears and drops a corrupting mithril axe. Or a lawful vs evil creature fight, and if you help kill one you, the winner will give you a reward (or nothing if you stand and watch).
Per the original idea: Would this work in all shops or just dungeon shops? It could be annoying if dwarfs kept buying all my potions of water in Dwarftown, especially if I have no idea which dwarves have items or which items they have. Are there any "cheap" items outside of a few shops with rocks and rations and stuff?