Yes, @TDK , it was a problem with the bootloader. PF11_BOOT0 was pulled high. That, along with some reg bits nBOOT0 and nBOOT1 being high, meant that the bootloader was executing. What's strange is how the execution of the bootloader didn't happen right away. Maybe there's a time factor involved too. I haven't dug into the bootloader because we don't plan on using it.
Setting nBOOT1 to 0 in main didn't help, at least not while debugging, which introduces time delays. PUlling PF11_BOOT0 low did fix the problem.
The reason this seemed related to HAL was probably because of the added time HAL initialization takes than LL initialization. Also, as soon as I started stepping into the code, now the time is affected too. An interesting complication.
Anyway, that was the problem. I'm up and running now. Thanks.