The bug
As shown here: Costless Bartering In Snapshot 20w07a
When bartering with a piglin it instantly throws the result but then continues to admire the gold ingot. However when it is killed while admiring the gold ingot, the ingot is dropped, therefore allowing bartering without actually paying anything.
How to reproduce
Summon a piglin with low health
/summon piglin ~ ~ ~ {Health:0.1f}
Right click it with a gold ingot
❌ It throws an item at youKill it while it is still admiring the gold ingot
❌ It drops the gold ingot
Can confirm.