Assuming the bank has not made a rule against it ( otherwise, taking the coffee would be taking the property w/o permission, which I would think would probably be illegal and probably unethical), I don't see why this would be unethical.

I can see how it could be kind of rude, and I can see why it might not be ethical to do it on a regular basis,

but it isn't obvious to me why if I particularly wanted some coffee, if I occasionally took some that they were giving away for free, and they did not require one to be a customer to take (note: I don't mean "if they don't enforce it", I mean if their permission to take the coffee is not restricted from applying to non-customers) any of it, I don't see why it would be unethical for me to take some of the coffee.

Though, generally I would feel like I ought to ask whether I am permitted to take the coffee. I wouldn't want to be wrong in my assumption that the coffee is being given away that I am a member of the group that it is being granted permission to have some of it. Alternatively, if it was busy, I guess I could ask one of the customers if I could have a coffee that they were being allowed to take?

Even more realistically, I don't drink coffee, and even if it was some other beverage that I did want, chances are that I would not want it badly enough that I would go into a bank that was giving it away to get it, when I could just buy it somewhere else.

But I still don't think it would be unethical to take a coffee that a bank is giving away, if the bank permits it?

I don't think a kantian(?) reason against it would work, because it would just end up as "the bank no longer permits people who are not customers to take any of the coffee" which would be effectively the same as what would happen if no one one who was not a customer took the coffee.

___

Though, this does suggest a possible option for website which host ads to take:

For a first time user, instead of sending them the page contents, show them a screen with a (very simple and quick to read) contract. The contract would require the user to, when viewing the website, to not use ad-blocking software on the website. To proceed to the pages in question, the user would have to submit in a form the entire contents of the contract. The website would check that the contract the user sent matched the one they were provided, and provide the user with a cookie (unique to the user), to present to the webpage in the future, in order to see the actual pages. This way, only users who had agreed to not block the ads would be shown the webpages.

I don't think the sending the contract would necessarily be legally considered to be any more binding than checking an "I agree" box, but I think it would make it less ambiguous to me whether to consider the person to have agreed. They sent a message which contained the message, and stating that they agreed to it, after seeing the entire message, and (presumably) understanding that they would send a message saying that they agreed to it if they pressed the button that they pressed to send it. (or, if they sent it some other way).

I think in a situation like that, it would be relatively unambiguous that they were (ethically(?)) under a contract to not block the ads on the webpages they viewed on the website (to the best of their abilities).