Back in the day, before WotC discovered that pirating happens on the internet, they had made older material available for purchase on a couple of websites.
I bought about 300 of the PDFs (Planescape, Dark Sun, Forgotten Realms, Birthright, plus selected Greyhawk, Dragonlance, Mystara/Basic, and...