The mage had attack. I can see in the image that when the interaction happened, the mage had attack value from some card. If an enemy minion attacks you from something while your hero has attack value, the minion will take damage. The reason weapons don’t do that for example is because weapons are “unequipped” when it’s not your turn, or locked away.
Thank you! That clears it up. I was so confused when it first happened.