I’m not a lawyer, but afaik these kind of legal tricks don’t actually hold up to any legal scrutiny. £2 was given, a beer and a chocolate bar was received. You can say one was free and the other was paid for, but the law is robust enough to see through that.
But the function tricks like that serve is a layer of misdirection/abstraction that allows people to look the other way. See also: Bunny Colvin’s “paper bag” speech from The Wire.
Nobody thinks prosecuting a recording studio for selling beers at cost is a good use of the law, but also nobody thinks that letting law enforcement pick and choose who to prosecute is a good idea - the “loophole” acts as a release valve for that conflict
So if I buy 2 beers and I give you 1 and you give me the money for it, I should be prosecuted?
It worked for all the pot shops in DC for years.