Sheesh. OK, I'll spell it out in more detail. Presuming the STM32WB data sheet specs the LSE startup time the same as the F429, they give only a "typical" startup time at some nominal voltage and temperature. Because "actual" startup time depends on factors that ST has no control over - crystal, caps, PCB routing, voltage, temperature, ambient moisture(!), etc. The 5 second delay in the HAL code is probably a SWAG (simple? wild *** guess) as to what might be "more then enough" time for the oscillator to start under MOST circumstances. It may be possible to design a board and select components where 5 seconds is not sufficient.