Answer to old chestnut: who paid for the beers?
The man who drank them paid for the beers!
One way of analyzing this situation is to consider the man's border crossings as a form of economic work, in that he transported a commodity (the dollar bills) to a place where they were more highly valued.
Another way of answering the problem is to say that the people before him who transported all those dollars into the countries where they were valued less paid for the beers. Consider that whoever spent those dollars in the
wrong countries would have received change equal to only 80 cents worth of the money of the country they were in (which was then worth only 72 cents of the other country's money, if they took it back across the border). These people paid for the beers.
In either case, realize that the man can only do this a limited number of times. Eventually, one bar or the other will run out of dollar bills from the other country.
The situation is not nonsensical. There is work required in the currency-exchange business, and this is reflected in the different exchange rates you get exchanging money one way vs. the other. (Today, this is more often expressed as a fee for exchanging money either way, combined with a common exchange rate, but the principle is the same.)