As was pointed out in the comments, physics answers questions within a given framework, modeled with mathematics and accepting as extra axioms laws/postulates to pick up from the mathematical solutions the ones that describe data and are predictive in new situations.
Electricity and magnetism were observed from ancient times, the word "electron" comes from the greek word for amber, because rubbing it caused electrostatic phenomena, and the word "magnet" comes from the Asia Minor region of Magnesia , where the first stones attracting and repulsing each other were found.
The theory developed slowly, with laws which described the behavior of charges and magnets, and took off with Maxwell and his equations which is classical electrodynamics.
With classical electrodynamics the behavior of electromagnets can be predicted without entering into the quantum mechanical framework.
Permanent magnets need an explanation using the spins of the quantum mechanical building blocks of matter. This framework depends on more postulates, in order to model mathematically and predict data.
The how a permanent magnet is created can be explained by how the tiny magnetic moments of electrons and nuclei had been aligned by the magnetic field of the earth during its creation, and as the metal crystallized the alignment became permanent, the tiny dipoles adding up into a large magnetic dipole. This process can be reproduced in the lab and the existing theories, classical and quantum, are very accurate in predicting the behavior.
But how exactly does an electron "spinning" create forces around the magnet?
The quantum mechanical model is a probabilistic model, the assignment of spins to electrons ( part of the axiomatic framework) and the use of the mathematics developed for electromagnetism lead to the result of magnetic forces.
Also, the magnetic force on a charge moving in the magnetic field is qvBsinθ, and its direction is perpendicular to the field and velocity of the charge. Why are these two facts true?
Because the electrodynamic models, classical and quantum mechanical, fit the observations. The two frameworks blend smoothly into each other, the classical always emerges from the quantum mechanical, but the quantum mechanical details are not needed at macroscopic levels where h_bar can be assumed to be zero.
The link you give is another mathematical transformation within the framework of quantum electrodynamics that explains the consistency of the models. It is an extra complication obscuring that electricity and magnetism are observed input effects that have been modeled successfully mathematically.