It depends on a lot of things. Some banks charge to withdraw from other banks' accounts. Some banks join "networks" and don't charge for others in the same network. Some ATMs are set up inside stores, and they charge money that goes to the store instead of a bank.
I hear it's pretty common in the US. I guess it has to do with the question who operates the ATM. In Germany it exists too if you use an ATM from a bank that's not partnering with your bank (which is ~50% of all ATMs and straightforward to figure out).