These two sentences in STM32 mean that the 8 and 9 pins of the PB port are used as trigger signals for external interrupts, so Pin_8 and Pin_9 should be set to the input mode.
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
IPU refers to the working mode of the IO port is to bring the pull input, which is related to the specific circuit;
In short, if you select an IO port as the trigger signal of an external interrupt, you must configure this IO port as the input mode, otherwise the interrupt cannot be triggered.