Well there is currently no such feature that allows you to move all items of different types from your chest to inventory. At least, in vanilla Minecraft.
However, there could be a reason for this "phenomenon" occurring. Accoding to the Minecraft wiki on inventory, it states that:
To move all items of one kind into a chest from your inventory (and
vice versa), pick up any item, hold ⇧ Shift, and double click one of
the items (or a stack) of the items you want to move.
In addition, it states in the Minecraft wiki for Chests:
By holding ⇧ Shift and double-clicking while holding an item, all
items of a type clicked on will be moved into or out of the chest.
To put this into a scenario, if you have a chest entirely filled with ONLY iron ingots, ALL the iron ingots will be transferred to your inventory is you were to ⇧ Shift and double-click one of the IRON INGOT STACKS.
However, if there were blocks of sand mixed up with the ingots, and you were to ⇧ Shift and double-click a stack of IRON INGOTS, all the iron ingots and ONLY the iron ingots will move into your inventory, leaving the sand behind.