Why is the image distorted when a magnet is brought close to old television screens or monitors with cathode ray tube (CRT) inside?

The image gets distorted because the magnetic field interacts with the electron beam, which is responsible for creating the image on the screen. This interaction causes the beam to deflect, resulting in a distorted image.