Why does the electron not spin? The goto answer to that question is that the electron is a pointlike particle and cannot spin.
The electron is not pointlike though. It is described by a wavefunction. One can prepare the wavefunction to describe a very small electron, but not a point-like electron.
Is there a genuine answer to the problem?
 A: Particle physicists usually use the term "spin" to denote intrinsic angular momentum, which for a charged particle can give rise to a magnetic dipole moment. In this sense, the electron has spin, even though it is an elementary particle and, as far as we know, has no internal structure.
A: I want to address this:

The electron is not pointlike though. It is described by a wavefunction. One can prepare the wavefunction to describe a very small electron.

The standard model electron is a point particle. The wavefunctions used in the quantum mechanical models to model an electron , call it $Ψ$, which defines the probability $Ψ^*Ψ$ to find the electron at an (x,y,z). Probabilities are measured by taking many events with the same boundary conditions and have no connection with the size of the electron which is assumed axiomatically in the calculation of   $Ψ$ .
Edit after comment: to elaborate on "which is assumed axiomatically in the calculation of   $Ψ$ ."
In the quantum field theory of the standard model all the elementary particles in the table define a field in all points of space time,( fermions  represented by the plane wave solution of the Dirac equation, bosons the Klein Gordon, photons the quantized Maxwell) on  which fields  creation and annihilation differential operators act. The calculations are done with Feynman diagrams where all particles are treated at the vertices as point particles.
A: The spin is a quantity that describes how a quantum field transforms under a Lorentz transformation. Depending on a field's spin, it either transforms as a scalar, a spinor or as a vector. The classical picture is that you imagine the electron as a point particle but in Quantum Field Theory that picture is replaced with the notion of quantum fields and while a field can carry angular momentum, it cannot spin about itself like a classical point particle.
A: That is also why it is called intrinsic spin meaning that it shows all the effects of a spin (angular momentum etc.) but we don't know or we don't care by which mechanism it gains these.
Your question is ontological and has nowadays little to no epistemic value. As long as we know the input to a black box and its corresponding output, we don't care about the black box.
The ontological answer is, we don't know.
The epistemic answer is, since the single electron at rest is a massive dimensionless point particle it cannot have spin in its classical interpretation. Therefore, the single electron at rest has quantum spin 1/2 but no physical spin.
I know it is hard to swallow but modern particle physics does not care about ontology as long the existing standard model can predict accurately results. Maybe in the future when unknown physics are pilled up and all our models fail, we will be forced to an ontological explanation and investigation assuming we will have the proper tools for that.
A: We simply don't know that the electron does not spin. This would require a mechanical model that interprets its intrinsic angular momentum as rotation, which we do not have.
In practice, electronic spin behaves like any other angular momentum. For example, it contributes to the centrifugal force in the hydrogen atom just like orbital angular momentum does, see Itzykson&Zuber. It precesses in a magnetic field (Larmor precession).
A: About the spin
A genuine progress would be to attribute to the electron a dual property of electric charge and magnetic dipole. If one looks at the history of the discovery of the spin and the magnetic dipole of the electron, then the following development would also be possible:

*

*The electron is (in addition to its electric charge) a magnetic dipole.


*When moving in a magnetic field, the external magnetic field influences the orientation of the magnetic dipole of the electron. The emission of EM radiation that occurs firstly deflects the electron and secondly periodically disturbs the orientation of the dipole. In the process, the electron is directed onto a spiral path and comes to a standstill in its centre after releasing all of its kinetic energy.
Thus the analogy of the gyroscopic behaviour of a rotating mass and the deflection of the electron in the magnetic field is invalid. The electron does not need spin to explain its deflection behaviour.
Pointlike behaviour
I am not a theorist who needs a point-like electron for calculations.

*

*However, I do know that the electron has a radius of action. Depending on the lateral distance to an electron (bound in an atom), a photon will be absorbed by the electron or it will not.

*If one accepts that the electron is a magnetic dipole, then the electron cannot be a point-like structure because a dipole always requires spatial extension.

Entanglement and wave function
In the description of the arrangement of electrons in the atom, after the assignment of three quantum numbers it was noticed that an entanglement of electrons was observed (nothing else is the Pauli exclusion principle).
After what was said above about the magnetic dipole of the electron, it is now consistent to speak of the magnetic dipole instead of the spin quantum number.
This radically simplifies the number of quantum numbers to 2 (because a magnetic quantum number had already been introduced before):

*

*In the first shell there are 2 electrons with opposite magnetic dipoles for helium (so far spin up and spin down).

*in the second shell, in the neon atom, 8 electrons are arranged at the edges of an imaginary cube, always alternately with the north or south pole directed towards the nucleus (see also the unfortunately rejected valence theory by Gilbert N. Lewis).

*In the row of atoms from lithium to neon the typical sawtooth-like pattern (see this image) occurs due to the mutual influence of the magnetic moments, which describes the binding energy. Almost every pair of electrons in the atom is more stable than the odd number. The 5th and 6th electrons are an exception. This is where research can begin in order to confirm - or reject - the more stable cohesion of 5 dipoles compared to 6 dipoles around a common centre by calculation.

The wave function is successful in describing hydrogen-like electron states. For more complex atoms, it is neither calculable nor practical.
Moreover, the theory describes lobe-shaped distributions of electrons that cannot play a role in chemical compounds. An electron forms a stable chemical bond with the electron of the neighbouring atom and is not localised in the two arms of the double lobe or other formations of the spherical harmonics. For an isolated atom, on the other hand, such a calculation plays no role. I can calculate whatever I want, only in the interaction with other atoms can the reality of the calculated formations be checked.
Incidentally, there are sperical harmonics that allow a calculation for Lewis' cubic atom (l=3, m=2, l-m=1). Instead of determining the position of the wave functions along the Cartesian axes, one can also calculate them for the position along the edges of a cube.
