Here's why:
* Moving Charges Create Magnetic Fields: A fundamental principle of electromagnetism states that moving charges generate magnetic fields. Electrons are charged particles, so when they move, they create a magnetic field around them.
* Direction of the Magnetic Field: The direction of the magnetic field is determined by the direction of the electron's motion using the right-hand rule. If you point your thumb in the direction of the electron's velocity, your curled fingers will indicate the direction of the magnetic field lines.
Important Note: While every moving electron generates a magnetic field, the strength of the field depends on the electron's speed and the number of electrons moving together. For example, the magnetic field of a single electron is very weak, but in a current-carrying wire where many electrons move together, the magnetic field becomes much stronger.