There was no market for siege engines, just for siege engineers, because siege engines are not portable. A trebuchet, for instance, would be built on-site from local timber for a siege. An engineer could earn a significant retainer for serving the king -- and thus no one else.
So we have "court wizards" who specialize in crafting items for the elite families that retain them. In exchange, they get sponsorship -- and even universities, where they can educate the next generation of court wizards. The king's gold secures the wizard's loyalty.
This also has the game benefit of giving kings reasons to have magic items to award PC parties who perform services for them. Basically, the PC's who have served a royal now have their own crafting wizard to make them whatever magic items they may need.
This works for clerics, too. And could be part of the stigma for spellcasters who aren't secured to a royal or organization. Sorcerers are trouble because they don't need education for their powers, they're loose canons, no one controls their magic crafting...
Precious gems were, for a long time, at least in Europe, the province of specialists within a particular minority who knew better than to channel their wealth into easy-to-seize forms, like land, and who had strong group solidarity and trust, which made dealing in portable wealth safe.
Another point for a Wizard's Guild or Wizard's College that spellcasters need to belong to. For divine spellcasters, a Church works pretty well, too. "Free Agents" are frowned upon because they're not controlled by the trusted network.
Artists tended to produce works for wealthy patrons, on a contract basis. I don't know how often wealthy families ever sold any work they already had, but I assume it wasn't often, because it would signal a decline in status.
Makes sense for D&D pretty well. A royal family might pay a real-world artist quite mightily for a portriat. In D&D, the royal family pays a D&D-world spellcaster to craft them, maybe a
cloak of protection. The cloak has golden thread praising the royal family woven into it.
I like treating expensive D&D magic items as items of art, commissioned specifically. It makes a lot of sense.
And the less expensive ones can be found in random apothecary and curio shops the world over!