SCIENCE results:
Loaded my current fort while using the latest dfhack. Initially, all dwarves wore whatever clothing they migrated in.
Used the "clearowned all" command and then dumped all the clothing. Once dumping was complete, unforbid clothing so it could be moved to a large stockpile.
While most dwarves moved clothing to the stockpile, or started to claim items and store them in cabinets in their rooms, only one dwarf got "pickup equipment" and put on a full set of clothing: the sole military dwarf (commander) who was not active/not on duty at the time.
I then locked a random dwarf in his room and recruited him to the military. He wouldn't get dressed in his owned clothing, but once I let him out he put on a full set of civilian clothes (but didn't claim them). Note that they do have a universally preferred order of dressing, but it doesn't stop them from skipping an item (if you forbid all shoes) to go further down the list.
So I am thinking it has something to do with the uniform system, so I enabled woodcutter on a dwarf who doesn't have it yet. He goes and puts some clothes on, but never equips an axe since we don't have any spares.
Next, I tried toggling the miner labor on a miner dwarf while the game was paused. Without dropping his pick, he put some clothes on, starting from items on his hands and then working along the order from there. He didn't equip shoes or socks, for example. I turned off mining, and he only returned the pick to the weapon stockpile. I had the (nothing was owned) clothing he was wearing dumped. He didn't grab anything else, even if I toggled his mining labor. I unforbid his dumped clothing and toggled his mining labor, and he ran to the dump to get dressed. He had easier access to unclaimed clothing in a stockpile than to the dump.
I was able to repeat the miner results with a second miner. I also suspect that the action of picking up a barrel for drinking has a similar effect to toggling the miner labor. I also note that miners are willing to use a new pick if their previous pick was taken from them and dumped.
I dumped a pig tail fiber cap from the militia commander. He wouldn't claim another cap, despite plenty of identical pig tail fiber caps or more expensive caps being availiable. He did go retrieve the specific cap that he equipped earlier in the day from the dump once I unforbid it.
Travelling backwards in time to a copy of the save file, I learned that the commander got dressed in the items that he owned before I used "clearowned all", including the specific pig tail fiber cap. A miner also was wearing an owned sheep wool hood that I had seen him equip from the dump (without claiming) in the alternate timeline.
Conclusions:
If you use "clearowned all" to confiscate and dump clothing from dwarves, they will retrieve the items that they previously wore if something triggers them into questioning their inventory, such as assigning a labor that requires a tool or assigning military duty. This means that they still have a psychic link to items despite no "owned by" displayed on the item. The dfhack tool is apparently only removing the "owned" flag without breaking said link.
Unanswered questions:
- How does damaged clothing work with this? Will they put damaged clothing back on? My fort isn't old enough.
- Does anyone ever wear clothing that they claimed and brought to their room, if the tool is used to "remove" ownership?
- Is only migrant clothing ever equipped?
- Is manufactured/goblinite/caravanite clothing ever equipped?