So if you utilize Xanathar's pricing guide, then your wizards are somehow coming across 500,000 gp or each level from 17 to 20th and beyond.
It is assumed that players are researching these spells while they are adventuring. The system is giving the player two spells per level, for free. Each of these spells must be of a level for which you have spell slots, as shown on the Wizard table. Learning Spells of 1st Level and Higher Each time you gain a wizard level, you can add two wizard spells o f your choice to your spellbook. At 250,000 gp for a 9th level spell keep in mind that you have this from the Player's Handbook. If Xanathar's Guide to pricing of scroll cost was used, the value of the scrolls would be much higher.
The creation cost would have to be lower than the value, or no one would sell at such low prices. These tables lead you to the 'value' of the scroll, not the cost to create.