Why do credit cards have have a magnetic strip on the back?

the magnetic strip on the back of credit cards r use to store information about the card holders account

the information is stored in the form of magnetic field same as that in a floppy disk or a tape cassete