Items are sorted into groups (equipable, usable and others) that are separated if possible. It usually tries to start each new group on a new tab in the inventory, but if that's not possible, it will instead do as you see with your consumables and other items there.