Here's why:
* The Dynamo Theory: This theory explains the Earth's magnetic field as a result of the movement of molten iron in the Earth's outer core. The core is made up of liquid iron and nickel, which are constantly in motion due to convection currents caused by heat from the Earth's interior.
* Spinning and Convection: The spinning of the Earth and the convection currents in the outer core act like a giant electrical generator. The movement of the molten metal creates electrical currents, which in turn generate a magnetic field.
This magnetic field is crucial for life on Earth as it acts as a protective shield against harmful solar radiation.