Okay, I did some testing and figured out what was going on with tools becoming randomly unequipped from my hand. A tool will become unequipped from your hand when:
- Another tool is moved directly from storage to create a smartstack with the tool, or to add to an existing smartstack containing the tool
- Another tool within the same smartstack is moved directly into storage
Tools do not get unequipped as above when they come from another slot in your inventory. Storage includes at least crafting tables and storage blocks, I assume all non-inventory storage would have the same effect though.