The profound answer to the question How permanent magnets work? starts with
Sub-atomic particles such as electrons, protons, and neutrons (and many others) have a fundamental quantity called a spin angular moment. For an electron it is $ℏ/2$. This spin gives rise to a small magnetic moment for the electron. Despite the name, we don't think the electrons (or other particles) are spinning around an axis ... Every bound electron in an atom also "orbits" the nucleus. And this orbital motion gives it an orbital angular moment which also gives rise to the orbital magnetic moment.
This suggested, that a magnetic moment arises due to a circular movement and due to a spin. Nothing rotates due to the spin of the electrons, but it generates a magnetic moment.
What surprises me is why the accent is often on the spin of the electrons,
The spin is understood to be a fundamental property like mass or charge
but not on the intrinsic property of the magnetic moment of the electrons.
It seems to me that the order of discovery has a important influence on the primary and secondary role of spin and magnetic dipole moment:
Ampère's circuital law was discovered in 1823
Maxwell's explanation about the magnetic field as the result of moving charges was developed in the 1860th
The reason for the induction of a magnetic field couldn't be explained in this years. Only in 1907 it was predicted that electrons have a magnetic dipole moments: "The idea of elementary magnets is due to Walter Ritz (1907) and Pierre Weiss."
Taking the magnetic moment as an intrinsic property and explaining the deflection in a magnetic field by the interaction of those fields, would this conflict with the theory of electromagnetism?