I wouldn't be surprised if it's related to threading. Every so often, my units will get in combat while on their way to loot something, and pick up the loot during combat. This happens most often if I double-click a unit to bring up its details screen.