Legion is when they added the distinction to the UI in the form of the quest log, but it was kind of an unofficial institution all the way back to Cata, I believe - which kind of started the whole "questing on rails" basis of leveling. In Cata, MoP, and WoD you sort of got led from hub to hub via breadcrumb quests - and while there were side quests you could snag along the way, at times way out of the way, they were basically immaterial and were often skipped and not found until much later at max-level. Before Cata, questing was a lot more distributed and less cohesively organized - you'd often find hubs through adventuring rather than being led to them in the majority of cases. I remember in WotLK there were a lot of times I'd go investigate an oddity I saw in the distance only to chance upon a set of quests concerning it.