If someone left money at an ATM machine and I took it, can I be charged?
If you went up to an ATM machine and found money in it left by some third person, the right thing for you to do is to turn the money to law enforcement with a detailed explanation as to the circumstances as to how you came to have this money in your possession.
You need to be aware that the bank in all likelihood has a television monitor at the ATM showing peole attending its use. So, most likely you are on tape. Possibly you could be charged with some crime for taking possession of money that is not your own.
Most likely, if you turned the money over to law enforcement as lost and found, no one will collect it and you will end up getting to keep it.