The bug
When there are invalid stacks of items in a single slot in bundles, right-clicking down with a bundle will take out a full stack, instead of the entire content of the slot.
Note that this only occurs when the bundle is in the mouse cursor, and you right-click with the bundle over an empty inventory slot.
How to reproduce
Run:
/give @s minecraft:bundle{Items:[{id:"minecraft:stone_sword",Count:5b}]}
Right-click an empty inventory slot with the bundle
→ ❌ Notice how one sword came out of the bundle, instead of the whole stack of swords which appear to be in the same slot
I can confirm 🙂