A lot of people feel the way you do, which is why I try not to assume endless magic shops are available. But if such shop was available, it would have to have enough security that it wouldn't be robbed within a day.
So, a basic magic shop would actually be located somewhere else... inside a random mountain in the infinite plane of Ysgard for example. Or perhaps in Mechanicus, so that local law enforcement is actually a really nasty golem. It then establishes store fronts in major metropolises (and having such a store would be a huge income boost for the local metropolis, so they'd be obliged to help protect it). Use portals to connect the back room of the store to the main warehouse, but keep them small, and perhaps make them a sort of portal that can't pass anything living through them. Illusions on the walls advertise the merchandise, and while the local shop keepers may actually be human or whatever the dominant race is in the area, they don't keep any actual merchandise or gold in the store. When a customer buys an item, they pass the appropriate amount of wealth through the portal along with an appropriate coded note indicating what item is to be purchased. On the other side of this, workers (likely unseen servants, golems, etc) process the order after a quick check is made on the incoming money to ensure it's not counterfeit. However, the order must make sense... if a single gold piece comes through ordering a +5 sword, they know something is wrong and they contact local law enforcement to come check it out.
Basically, a Magic Mart is actually a lot closer to a major corporation today than a little mom and pop shop. Which makes a lot more sense than the idea that some 5th level Expert has billions of gp in merchandise just sitting around defenseless.
JaronK