Question: what are the importance of magnetic field?
Answer: The Earth's magnetic field serves to deflect most of the solar wind, whose charged particles would otherwise strip away the ozone layer that protects the Earth from harmful ultraviolet radiation.