Nah, they're not forbidden. I was trying to observe what happens; as soon as I mark the barrel for trading multiple stacks inside the barrel get marked as tasked. Those eggs then get left behind.
What are they tasked for? Dwarves will sometimes move items between containers if they think the current container is unsuitable. I don't recall if this is the case, but, if containers hauled to the depot lose their stockpile link, what you observed could totally happen. A possible solution (if that's indeed what happens) is to temporarily disable eggs in all your stockpiles, then the eggs will have nowhere to be moved into.
I think you may be right.
This is what the barrel looks like when I selected it in the trade depot screen:
And this is the same barrel before I unpaused it. Note that the barrel is unlinked from the stockpile it's curently sitting in:
After unpausing, the barrel acquires a link to a different egg stockpile (one that's set to receive from anywhere, not sure if there's a connection to it). Eggs in the barrel starts getting tasked:
Dorf picks up the barrel, leaves the tasked eggs behind in the original stockpile:
The eggs that got left behind in the stockpile:
More eggs get tasked while the barrel is being hauled to the depot:
Barrel arrives at the depot and yet even more eggs get tasked:
The remaining eggs in the barrel in the depot (tasked eggs get hauled to the stockpile that accepts eggs from anywhere):
I will try your suggestion of disabling eggs in all stockpiles for the next caravan. I'll also try disabling accept from anywhere on the other stockpile first. Either way, I'm pretty sure this behavior, either the stockpiling of too many eggs in a stockpiled barrel or the removal of eggs from a hauled barrel, is not intended.