This happens if you have no weapon equipped and pick up a two handed weapon off the ground. Or if you have no weapon and equip one by right-clicking from your inventory.
After being automatically equipped, your offhand/shield slot stays looking empty until you left-click and drop a weapon onto the slot.