It can be noted that a standard length of tying equipment is 15 ft, the amount used was 3, and that 15 - 3 = 12, i.e. I'd investigate if the length of tying equipment was the length retained rather than the one removed.
An experiment would be to use the 12 ft rope (I'd use the original rather than the retrieved one to rule out any potential corruption transfer) to build a trap, verify that the rope remaining is 9 ft, dismantle the trap, and check the length of the recovered rope. I wouldn't be surprised if it turned out to be 9 ft.
A third test would be to use a 3 ft rope and verify that building and retrieval worked correctly).
Edit: I went through with a test sequence:
- Built two small deadfall traps using a single pristine willow bark cord (a modded item, but I don't think that matters here), verifying the amount left was 12 and 9 ft, respectively.
- Disassembled both traps, and checking the length of the cord returned: 15 and 12 ft, respectively.
- Built two new traps (from the material used for the first trap pair, except for the cord. The material was used directly from the ground (shouldn't matter). Again, the length of the remaining piece of cord was as expected: 6 and 3 ft.
- Disassembled both traps. Length of cords returned: 9 and 6 ft.
- Built a last trap with the final piece of cord and disassembled it. The cord retrieved was 3 ft long, as it should be.
Thus, it seems the cord built into the trap is a copy of the one used as it looked when the recipe was initiated, rather than a 3 ft length cut from it, with the original then being shortened after the copying took place. I'd guess the copying of the original is done to ensure all the relevant properties (quality, type as a minimum) are carried over, but the step where the length of the cut piece is set has been omitted.
I don't know if the 3 ft piece of cord returned when disassembling the last trap in the sequence is that same object as the one used to build it, but that probably doesn't matter as items with exactly the same set of properties are completely interchangeable (and thus can be stacked), as long as any item destruction is handled properly.