It appears that this happens whenever you trade a container that contains gold to a merchant.

When you close the merchant's trade screen, the inventory will then be sorted, and part of that process will be sorting the gold into that container.

Later, when the merchant does a restock (I hear that happens once every 4 hours and/or at each level-up?) the game will not detect the gold in that merchant's inventory because it is technically a container. It will give the merchant more gold... and the gold will immediately be sent to the container.

This means the merchant is gaining max possible gold every interval AND the gold eventually becomes inaccessable, as that gold is not considered by the "add gold to match offers" button and if you try to buy the container, it's all or nothing.

screenshot related:
[Linked Image]