to reproduce, have an empty inventory, take one enchantable item, shift click it into the enchanting table, then shift click it back out. it'll go to the second slot, then next item to the third one etc. completely ignoring the first, bottom right slot of the quick bar.
if your inventory's full except for that one slot, it'll instead shift click to the other enchanting table slot, never actually trying to go into the ignored free slot.
to reproduce, have an empty inventory, take one enchantable item, shift click it into the enchanting table, then shift click it back out. it'll go to the second slot, then next item to the third one etc. completely ignoring the first, bottom right slot of the quick bar.
if your inventory's full except for that one slot, it'll instead shift click to the other enchanting table slot, never actually trying to go into the ignored free slot.