Weapon Magic is an attacktype property that ignores the target's Armour (aka physical resistance) score.
Weapons, spells and monsters can use or have this attack type. So, Ac score can play a role in avoiding taking damage from weapon magic.
Certain area of effect attacks (i.e., spells) will almost always cause damage to the target so items with resistance to weapon magic is the best protection.
It therefore should be used parsingly.