In Classic and for a few expansions you had to visit your class trainer every few levels. There were even books that dropped in AQ which taught you spells above the trainable max rank in Classic.
First the ranks were removed as a QoL improvement as mana regen was reworked so players no longer needed to juggle the lower rank spells into their rotations to conserve mana, especially healers.
Then as an ultimate QoL improvement to streamline the leveling experience you just get the spells when you level up.
And now we get ppl who mistake QoL with Lore. You want proof? The class trainers in the old zones.