It is always more profitable for merchants to load their own ATM. But it wasn’t always an option.
In the past, most machines were more particular about the actual cash they would accept, and would require only "fit" money (no wrinkles or creases). With new, fresh bills being more accessible in major metropolitan areas near Federal Reserves, many small town banks in rural America were not able to offer customers ATMs.