I think there's two reasons why it would make sense for magic item creation costs to be as high or higher than purchase cost, that fit with the idea of D&D and the stories portrayed:
Most of the permanent stuff for sale is ancient
For most of it, it doesn't matter how much gp a caster once spent for it. The magic item for sale in the Bazaar of the Bizarre isn't made by the owner, or anyone he knows. It's made by an ancient wizard, who died centuries ago, and isn't going to see a penny of that money. It was probably looted by adventurers, who then decided they didn't need it all that much, so they sold it for whatever they could get for it and now it's for sale for whatever the item's owner thinks he can get for it.
The reason he asks you for 2000gp, even though you can make it for 2000gp is because A) most of the people who can afford a magic item, could also make one themselves and B) he's now undercutting any bored Wizard who tries to compete with freshly made magic gear. Considering these magic items are practically indestructible and require next to no maintenance, there's eons of time that they've been made in and most are simply still around to be found.
The market for permanent magic items is terrible because the stuff literally lasts forever and there's a whole class of people whose only job is to venture into the wilds, "liberate" the items and then sell them cheap so they can get some more potions for their next "adventure". Sellers are simply responding to this dynamic.
Most of the consumable stuff is made by specialists
The reason your Wizard takes 4 days to write a scroll and spends a 100gp on it is, for a major part, because your Wizard is a firebreathing, lightning throwing, people charming, monster summoning murder-machine and not a scribe.
Probably if you decided to spend 90% of your time learning how to write a Scroll of Burning Hands faster and cheaper than usual, you could also learn to do it in half the time and for half the cost and earn some money selling those scrolls to the other Wizards who don't perfect the art of calligraphy but instead waste their time going out to kill things and take their stuff.
You simply cannot reasonably compete with the people who dedicate their lives to creating consumable magic items and never learn to survive adventures. (And the reason there aren't any rules for doing so is because this is Dungeons & Dragons and any such character would be an NPC, not a player character)
Why you can't make money selling magic items
Ultimately, what it comes down to is this: making a lot of money off of creating and selling magic is boring and not what D&D is about, so the standard rules don't allow for it. The above is just flavoring for why it's like this.
Any experienced DM who can turn "making and selling +1 swords" into a fun play session will have enough experience to tweak (or disregard) the rules so that it works.
Any DM who doesn´t have that level of experience cannot accidentally screw up his game by showing his players how to make loads of money without actually risking their hides in the adventures that the game is about.
It's a win for everyone.
1. None of the named magic items are found in the index...
... annoying, but it seems only the categories of magic item (rings, rods, staffs, wondrous items etc.) are in the index, not the specifics. Instead of using the core books to search for specific items, I recommend using one of the SRD websites - I use 5thsrd.org to quickly search for individual rules.
2. By default, you can't buy most magic items
Default 5e assumes that "magic shops" pretty much won't exist, and even goes on to suggest that potions and the like be bought at alchemist's shops instead.
From the DMG, page 135:
Unless you decide your campaign works otherwise, most magic items are
so rare that they aren't available for purchase.
and further:
If your campaign allows for trade in magic items, rarity can also help
you set prices for them. As the DM, you determine the value of an
individual magic item based on its rarity. Suggested values are
provided in the Magic Item Rarity table.
The Bag of Holding is an uncommon item, therefore in the 101 - 500GP range. At this point, it is at your discretion.
Magic items in 5e
Unlike previous editions (particularly the 3/3.5/4 era) 5e is designed to depend much less on magic items. Together, the:
- attuning rules (which limit the number of powerful items any individual character can have),
- the expressly "lower magic" setting (which generally restricts the purchase - and sale! - of magic items),
- and their "bounded accuracy" (lower difficulty, ACs and progression gradients)
...ensure that high level 5e characters are powerful because of their raw skill and ability, not the plethora of magic items they happen to be decked out in. This was a specific design decision going back to the very first D&D Next playtests. (As a side note, having your party find that Bag of Holding in some dusty and forgotten attic is also more rewarding than just stopping by the local Bags of Holding R Us and grabbing a few!)
Best Answer
Xanathar's Guide isn't explicit, so let's reverse-engineer it
All of the following conclusions are reverse-engineered from the tables in XGtE and the item descriptions in the DMG. They don't explicitly appear anywhere in the rules.
What is a consumable item?
For the purpose of the following guidelines, a consumable item is an item that can permanently become non-magical or otherwise be destroyed during normal use. An item with charges that can regain them an unlimited amount of times does not count as consumable, even if it can be destroyed by consuming its last charge and rolling a 1 on a d20.
Categorization rules
All consumable items are minor items, unless any of the following are true:
All common items are minor items.
All non-consumable uncommon items are minor items unless any of the following are true:
All non-consumable rare or very rare items are major items, unless they have little or extremely situational combat benefit (folding boat). Cursed items may have a detriment instead of a benefit.
All non-consumable legendary items are major items.
Conclusion
If the item is consumable or is common, rare, very rare, or legendary, it is usually fairly simple to categorize; however, non-consumable uncommon items are a gray area. If they have a major combat benefit, the answer is simple. If not, you end up comparing them to existing items and dreaming up ways they could be used.
Does the wand of secrets provide less of a dungeon crawling benefit than the gloves of thievery? Is it really more important to be able to jump really far (boots of striding and springing) than to see in the dark as a human (goggles of night)? I'm not sure.
What I do know, is that the same people who wrote the XGtE tables decided that attunement-free unlimited flight without an action (broom of flying) is less rare than attunement-required 1 hour flight with an action (wings of flying). You're probably better off using your own discretion for the edge cases.