Why do credit cards have a magnetic stripe?

The information such as the credit card number can be easily swiped into the machine. This is much faster and not subject to entry errors if someone had to type the information in.