My 1st guess is you were in ATL.
Did you have a jacket? Could you not put the shot glass in your pocket?
I experienced this a few times - with one particular gate agent, she does not play - but she takes it to the extreme, which is just ridiculous and uncalled for, IMO.
It seems many times you have gate agents like this - enforcing something so ridiculous, and then other gate agents let people walk on with cargo carriers