Except there's no guidelines at all to buy magic items and it's pretty much specifically disallowed by the RAW and no official content I've seen indicates a setting where this can happen.
And really, does anyone ever get to a high enough level to cast those spells? Official adventures suggest the game ends at 11th level.
I think each of these statements is untrue, actually.
There are guidelines in the DMG and Xanathar’s Guide To Everything for buying magic items.
Buying magic items is explicitly allowed, with the “catch” that it’s up to the DM whether an item can be found for sale, and what price it might have, and whether you’d have to also do someone a favor to even get “in the door”.
Those two sources, and the new Eberron book, directly indicate that “this can happen”. Eberron is explicitly a world where you can buy common and many uncommon magic items from a Cannith licensee Crafter’s Guild crafter or merchant. Or commission a piece from an Artificer, or buy one from a collector, etc.
Data shows that most games end around level 12-14. The APs tend to end before that, but nothing about that suggests that the game ends at those levels.
Spells aren’t even cheap at low levels.
Augury requires 25g worth of specially marked items for divination. Chromatic Orb requires a diamond. Find Familiar requires 10g In incense every time you summon your Familiar by casting the spell (including changing it’s form), etc. Continual Flame costs 50g every time. Magic Mouth 10g/cast. Clairvoyance uses a 100g focus. Glyph of Warding burns 200g/cast. Magic Circle 100g/cast. Non detection 25g/cast.
Revivify cost 300g in diamonds, per casting. You either have it ahead of time, or your friend stays dead.
Leomund’s Secret Chest costs 5050g. That’s a popular one, in my groups.
It adds up, if you actually track it.