Purpose of the extra WFI?

I am browsing the code of low power mode and there is one line which really confuse me.
up_idle() calls up_idlepm->stm32_pmstop() and there is a either WFI or WFE for entering low power mode. After wakeup, program will run to WFI. From my understanding, WFI is used to enter sleep and I don’t get the purpose of this line. This WFI doesn’t exist in regular NuttX code. Anyone have clue on it?