But it wasn’t presented that way. The rules in UA showed up in modules, for example. Non-weapon proficiencies from Oriental Adventures and classes from UA both appear in Isle of the Ape.
We may have treated the Complete 2e books as optional but that is not how they were presented.
The words Core don’t appear in DnD until 3e.
The back of the Complete Fighter's Handbook says "New weapons, new proficiencies, new fighting styles, and 'Fighter Kits' make this
optional AD&D accessory a useful item for players and DMs." So it's pretty clear it's called out as optional. And the 2e PHB and DMG even had a lot of rules
in those books called out as optional, including entire chapters.
As for core... there was that whole Core Rules CD.
But to be honest, I think this was a shift from 1e. I started playing with 2e, and when I bought the 1e FR box I was a bit confused by seeing "cavaliers" mentioned as a class, and treating paladins as a subclass of cavalier rather than fighter. I had had some brushes with the 1e PHB, but not with cavaliers. And this wasn't written as "If you use Unearthed Arcana, do bla bla bla" – it was just assumed that you were. But 2e books generally put more emphasis on the fact that the game belongs to the DM, and if you want to make house rules you should (it would be kind of hypocritical for them to argue otherwise given that almost every AD&D setting came with its own rules). 1e material, on the other hand, had a lot more "These are the official rules and if you're not playing by the letter of the law you're not playing
REAL AD&D!" My understanding is that that's not how Gygax actually
ran his games, but that was the gist of the books, and how it was parodied in Hackmaster.