Here's why:
* Spin Angular Momentum: Electrons have a property called spin angular momentum, which is similar to the rotation of a tiny ball. This spin creates a magnetic field, just like a spinning charged object in a macroscopic world.
* Magnetic Dipole Moment: This magnetic field is quantized, meaning it can only exist at specific strengths. It's often described as a magnetic dipole moment.
* Atomic Magnetism: The magnetic properties of atoms are largely determined by the alignment of these electron magnetic dipoles. In some materials, these dipoles align, creating a strong overall magnetic field (like in a ferromagnet).
Important Note: While we often visualize electrons as spinning particles, this is just a simplified model. The true nature of electron spin is more complex and described by quantum mechanics.