Probably a dodgy independent ATM. They are the worst. Always go to ATMs from banks.
Germany
Seems like ATMs have to display fees for foreign (i.e. not from the same bank) cards since 2011. That obligation can be satisfied by a putting a sticker with a fee schedule on the ATM. You don't necessarily have to confirm the fee during the withdrawal process. Receipts are unheard of here. I don't remember ever being offered one by the ATM and I'm always withdrawing from a foreign ATM, with a credit card.
There are some scummy ATM operators out there that seem to prey on people not knowing better. I'd steer away from ATMs that are not in a bank branch or not branded with a well-known name. Doesn't mean that the fees aren't high, but at least they should be transparent about it.
As a German with a German credit card, I would say that the ATMs usually ask me if I want a receipt and that they also display any fees (very rare!) upfront. But I don't know if there are laws for that.