It doesn’t cost you money if you withdraw it from an atm owned by your banking institution. If you use a machine owned by a different entity it costs money because your bank or credit union must pay to transfer money to the owner of the atm to cover your withdrawal and to pay for the machine, the lease of the space occupied by the machine, the staff that services and maintains the machine the programmer that wrote the software for the machine and so on and so forth.
I'm starting to learn Russian now
(But only because the dorm is horrible)