Finally, the equipment tables make no mention of spell scrolls, so they cannot be bought by default.
The real reason magic items and spells cannot be bought by default is of course that D&D is an adventure game, not a market simulation.
Magic items are gleaned from the hoards of conquered monsters or discovered in long-lost vaults. (DMG p. 135)
Finding scrolls and winning spell books from evil wizards (or salvaging them from their tombs) is a great incentive for wizard character players to go adventuring. It rewards them with new powers for the risks they are taking.
There is also accepted precedent that the game intends for wizards to be unwilling to share their magic.
This however seems inconsistent with other assumptions in the core rules:
Spellcasting Services
Hiring someone to cast a relatively common spell of 1st or 2nd level, such as cure wounds or identify, is easy enough in a city or town, and might cost 10 to 50 gold pieces (plus the cost of any expensive material components). (p. 159 PHB)
This indicates wizards of up to 3rd level are easily found in cities and towns, and that they are willing in principle to provide their abilities in exchange for gold.
Even higher level spells may be obtained. The description indicates that pure finanical payment may be insufficient for those:
Finding someone able and willing to cast a higher-level spell might involve traveling to a large city, perhaps one with a university or prominent temple. Once found, the spellcaster might ask for a service instead of payment—the kind of service that only adventurers can provide.
Scrolls
Wizards able to cast 2nd level spells also would be able to craft common items such as cantrips or first level scrolls.
Even Adventurer's Leage allows scribing of scrolls, for PCs, and if PCs can do so certainly NPC wizards can do likewise. That
Even uncommon items can't be easily created. (p. 135 DMG)
is certainly not true for spell scrolls.
And while the core crafting system makes it more costly to write scrolls than what their gp value is, player character wizards would often be willing to pay a higher price for access to new spells for leftover useless gold.
Spellbook copying
Even worse, between two wizards there is NO NEED to engage in costly scroll crafting to trade spells. They can just copy them from each other's spellbooks for free to both increase their arsenal (except for the cost for ink that you always have -- it costs nothing to get access to the spell).
There is really little that my groups' wizard player characters would like better than copying new spells in town, for payment, or even better for lettimg the town mage copy some of theirs, which would cost them nothing. Every new town the first stop is the town mage to see if he has any spells to sell or copy.
If it is so desirable for PC wizards, why would NPC wizards not have the same compulsion?
Why are there no spell trading fairs? After all, knowledge only grows when it is shared, to the benefit of all involved.
Spells should be on sale in some form in a world where wizards are relatively common.
By what in-game logic is there no market for wizard spells?