Ok @alnawire I will bite.
But first it must be acknowledged that humour cannot often be explained. Many times if you try to explain a joke it ceases to be funny. Think of the scenes at the end of the Vicar of Dibley when Geraldine has to dissect the joke for the sake of Alice who simply doesn't get the punch line.
However, this was more in the line of a prank than a joke. I know that on mumsnet "prank" is often seen as a dirty word and some people claim not to find them funny ever. They claim that pranks are just cruel and are intended to humiliate people. I think it is a question of degree personally.
When I was very small I thought the funniest thing ever was a trick teaspoon which we had purchased on a day out at the seaside. The spoon had a hole in it, but when it was pushed in to a bowl of sugar it looked like a normal teaspoon. I would take great delight in offering the sugar to guests who were having a cup of tea and then watching there look of surprise when all the sugar trickled out through the hole in the spoon. It was that reaction, that "Oh!", which I found hilarious.
So was I an unusually cruel four year old seeking to humiliate our guests? Probably you think so, but fortunately everybody I played this trick on saw the joke and joined in the laughter.
And that is the thing about pranks and practical jokes. Very often the "victim" will also see the funny side and join in with the giggle.
But I guess there is a sliding scale with the teaspoon at one end and much more intentionally cruel stunts at the other. As an extreme example, telling someone that a loved one had died and then when they are about to collapse with grief saying "Nah, only kidding." I imagine only some kind of psychopath would find that funny and the majority of people would be appalled. But for the oddities who did find that amusing it is essentially the same thing, the "humour" is in observing the shocked reaction of the person on whom you have played the prank.
I imagine most people will set there own bar on this sliding scale - up to a certain point still funny and a joke, after a certain point cruel and humiliating.
Back to this sip of beer. Whether or not you find it funny will depend upon where you set your own personal bar on this scale. If you are not on the scale at all, not even at the teaspoon end then no, of course you won't find it funny. Or if you will allow that the teaspoon joke was mildly risible but feel the sip of beer was going too far then, fair enough, past your own personal limit but still basically the same joke. It relies on the shocked reaction of the "victim" for its humour.
Myself I find it a harmless prank. The OP's DH was not trying to get her drunk by spiking her drink in some way, e.g. giving her a vodka and orange - that would indeed be cruel and wrong. He gave her the beer knowing she would immediately realise what it was and for him the funny part was seeing her expression of surprise when she tasted it. If I had been the OP in that situation I am pretty sure I would have seen the funny side of that and not felt at all upset or humiliated. But obviously we all differ in what we find funny and allowable as a joke.