It is a stepping stone thing. One leads to the other and then the next.
It really doesn't.
1e had distinct spell lists for magic-users, illusionists, clerics, and druids. Paladins would cast cleric spells at higher levels, and rangers would cast both druid and magic-user spells at high levels.
2e combined them into just the Wizard list and the Priest list, and subdivided the Priest list into Spheres where each priesthood would give access to different ones, and similarly wizard spells were divided into schools. Both Clerics and Druids were types of Priests, and had access to different subsets of the Priest list. Rangers and Paladins also cast from the Priest list, but using a smaller subset.
3e was, I think, the first place where the differentiation between Arcane and Divine magic was a thing in itself – previously it had been part of the classes themselves. But 3e pointed toward bards and wizards, and said "these classes cast the same type of magic, and this type has these special rules" and then pointed at clerics, druids, paladins, and rangers and said "these classes cast another type of magic, which shares these traits." All other spellcasting classes (except artificers) used one or the other, even if they had distinct spell lists.
4e added Primal and Psionic to the list (at least in later expansions), in addition to treating Martial as a power source as well. Still distinct class lists of abilities.
5e gets a little wobbly on the topic, and pretty much does away with the distinction. It's mentioned in the classes, but there's no meaning to it.
Pathfinder 2 develops from 3.5, and doubles down on magic types, and introduces one spell list per what they call Tradition: Arcane, Divine, Occult, and Primal. They even develop some theory around it, where each tradition uses two out of four Essences that are paired as opposites: Material/Spiritual, and Mental/Vital. So Arcane is Material + Mental, Divine is Spiritual + Vital, Occult is Spiritual + Mental, and Primal is Material + Vital. All primary spellcasting classes uses one of these, each tradition has an associated skill that is used to identify and understand that kind of magic, and so on. Some classes use one of the lists plus a handful of other spells – for example, clerics use the Divine list, but also add maybe three spells depending on their deity. There are even some classes (sorcerer, witch, summoner) where different subclasses use different spell lists. For example, an Elemental sorcerer uses the Primal list, while a Demonic sorcerer uses the Divine list. Notably, it did this without going via 4e which previously had the strongest distinction between power sources.
D1D seems to move in the PF2 direction, though reading between the lines it seems there will still be more distinction between classes than in PF2.