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, giving your bud a beer - legal. Giving anybody who buys a chocolate bar off you a beer: illegal. Now figure out how to write that into law clearly. In some places, i suspect that yes, giving your bud a bear is going to be technically illegal based on how the law is written.
But there is nowhere I’m aware of where you will get prosecuted for that, and that’s obviously correct.