DM's can allow or disallow any items they want in their game, much like how much XP they give out. Many DMs don't allow "magic item" shops.
Or, like these DM's, put limits on the availability of magic items to be bought.
The problem here seems to be inexperienced DM's, who have just figured out WHY other DM's do that.
Of course your DMs could have been more creative and stated that the store that you bought the items was burned down or the owner moved away.
I'm sorry you are getting jerked around though.
I agree it's not ideal to change the rules around in an on-going campaign, but for folks who are learning the game, I'd take a "oh well, give the DM's a break as they're new to the job" view and move on.
If anyone cares, my approach to this issue as a DM is to create magic shops as a campaign feature, rather than strictly thinking about it from a "here are the arbitrary rules to make the game balanced/to keep my story happening like I want it/to keep the PC's from complaining by letting them get whatever they want".
Here's how I think about what they'd be like in my milleau (3.5e):
-- There must be retired low-level who need money more than XP, so there should be low-level expendable items like potions and 1-3 level spells
-- Some items are more in demand (potions of Cure Light Wounds, scrolls of Restorations, scrolls of Fireball) by parties I've run than others (e.g., a +2 club or Horseshoes of Speed). Therefore, magic shops should endeavor to encourage retired spellcasters to keep a steady stream of FMCG -- fast moving consumer goods like CLW potions -- coming in, as they will sell a lot of these. Magic items will also tend to have white elephants -- the Horseshoes of Speed and other such items that parties tend to want to sell, and that move slowly, like antiques. But the magic shop won't want all its capital tied up in white elephants, so they will sell them more like a consignment store -- the seller gets paid only after the magic shop does. And items that everyone wants but few PC's can make -- like a +2 longsword -- will rarely be in stock.
-- Players sometimes talk about robbing a magic shop. It's where the magic is, after all. Therefore, a magic shop that sells anything worth stealing -- beyond CLW potions and the like -- must have protection. But, in D&D, there's always a bigger fish, so just having a golem or something (while not a bad idea in a shadier area/campaign with shadier PC's) is a good idea, it's not sufficient. What's the real protection -- the people who put up the capital to run the store. Likely, the mages guild, the Church of Boccob (the god of magic), or some rich powerful retired adventurers. Also, the adventuring parties who are trying to sell white elephant items on consignment would be mighty pissed if someone steals them -- heck has no fury like a PC who lost a magic item, so shouldn't NPC parties -- as Gygax said, the most dangerous of monsters -- be equally peeved if someone robs the magic shop?
-- Though logically a scroll of Fireball is more in demand and could be sold for more than other 3rd level spells, it's a guild world, so prices are fixed, not up to the shopkeeper -- and not negotiable.
So, IMC, there are two kinds of magic shops:
-- Small scale dealers who have a few CLW potions in stock, and maybe a few scrolls, and can try and get items on request (from the bigger dealers) in a few weeks time.
-- The Compleat Strategist-type place (like the legendary game store on 33rd St in NYC). They have LOTS of inventory, and higher value, rarer stuff compared to any place else, crammed into nooks and crannies, and a knowledgeable staff (how will, for example, do Identify spells for a fee). But even they don't have everything. To get their inventory, I roll up random magic items. As PC's buy and sell, the inventory changes, and when the PC's go back, I dice to see if some of the inventory has sold, and if knew stuff comes in. Some items will languish for years -- just like at the Compleat Strategist -- while other items are FMCG's.
-- The deal? Items cost full DMG price. Items can be sold for 80% of face value, but it mostly needs to be in store credit, since the store rarely has more than 2000-3000 gp in cash. Sometimes, if you're willing to wait a week or so, the store can broker a deal for cash. True white elephant items may not be bought at all -- but the churches will often buy evil items for cash to destroy them. You can sell anything you want on consignment, though -- you wait for a buyer, and if there is one, you get 90% of the sale price.
My players (in two campaigns/parties, sharing one setting and store) seem to accept how my stores work and appreciate the "realism" of it all.
Of course, your campaign may vary.