But, that's not exactly what's going on. Magnetism has zip to do with the placement of electrons into orbitals, for the basic lithium structure in question. (If I have misunderstood, please accept my aplogies.)The three keys are:
the Coloumb central force model of the atom,
The Pauli Exclusion Principle
The neglect of electron-electron interactions.
QM then determines that the problem is seperable, and each electron can be treated independently of the others-as far as finding wave functions is concerned. The lowest Coloumb levels are 1S and 2S. When ionized, the Lithium will end up with two electrons, spin up and spin down, in the 1S state. Actually, the PEP says: each electron has an equal probability of being spin up or spin down, which follows from the antisymmetry of the wave function. Most importantly, there is no room in the 1S state for another electron. So, the minimum energy configuration is 2 in the 1S state and one in the 2S -- except, of course, the PEP says that each charge has a probability to be found in the 1S +, 1S -, 2S +, 2S - states.
The PEP is, at first glance, not a force. BUT, in classical mechanics we talk about forces of constraint-- with, for example, a ball rolling off a table --. I've never seen it done, but I'm quite sure that in a Lagrangian formulation of QM, both Bose-Einstein and Fermi-Dirac statistical requirments of symmetry, and antisymmetry, could be formulated as constriants expressed in the Lagrange Multiplier formalism. Then go to Lanczos, The Variational Principles of Mechanics, for his lucid discussion of the interpretation of Lagrange Multipliers in terms of forces.
Regards,
Reilly Atkinson