Oh, that's how it works. I thought that pulling items from the container above always takes priority over pushing items into containers (chests in this case), and if there are many items, they are all pulled from the container at the bottom. So it always happens in turns, starting with pulling items from the container (hopper) above. Thanks for the great explanation!
So I should rather wrote this as a suggestion that pulling items from the container above should always takes priority over pushing items into containers (chests in this case), and if there are many items, they are all pulled from the container at the bottom