Most ATM machines are actually silent.
Only really old ATMs make a whirring noise when they get your money out. Within a decade of the rollout of the original ATMs, motors that were virtually silent were being phased in. But the engineers decided that people would feel better about the machine if you could hear whirring.
So in most modern ATMs, a speaker provides the whirring