Always seems to happen to me while Shift+clicking stacks of items to/from an inventory (player or chest UI) while other items are leaving or entering the same inventory. Haven't been able to reliably reproduce but it might be related to MCPE-160729
Examples
Shift+Click stacks out of a chest into player inventory while more items are feeding into the chest via hopper
Shift+Click stacks into a shulker out of player inventory while more items are being picked up from the ground by the player.
Always seems to happen to me while Shift+clicking stacks of items to/from an inventory (player or chest UI) while other items are leaving or entering the same inventory. Haven't been able to reliably reproduce but it might be related to MCPE-160729
Examples
Shift+Click stacks out of a chest into player inventory while more items are feeding into the chest via hopper
Shift+Click stacks into a shulker out of player inventory while more items are being picked up from the ground by the player.