What is the purpes of ATM?

For the banks: To make money.

For regular people: To take money from their credit card and make it physical money.