Well, this might be a bit subjective, but here are my reasons:
- I prefer to use a proper web-based documentation and a git code repository with good examples over a tool that I have to install (and that was originally not even running on Linux without tricks).
- The different layers CMSIS, LL and “HAL” confuse me. For simple tasks like sending data over a UART, the STM HAL does not really abstract the hardware enough. And if I want to use special features of the microcontroller I can just take the reference manual and set the registers directly. Otherwise I need to read about the features in the reference manual and afterwards find out in some other documents how to actually implement these features using HAL functions.
- mbed or other generic frameworks allow to write more portable code, that does not run only on STM MCUs.
- mbed syntax as easy to understand as Arduino, or even better, as PWM signals are not named analog (!) outputs.
However, mbed also caused some headaches. For example, several times the firmware that worked before suddenly stopped working after an update of the mbed version. But you can prevent PlatformIO from updating mbed and then it’s fine (if you use PlatformIO aswell).
Unfortunately, the definition of custom boards is a pain in mbed. I failed to set up a board with the STM32L452, which is not officially supported by mbed. That’s one of the reasons I’m now also trying out Zephyr. In the long term, I’d love to use Risc-V microcontrollers once they become available for the low-end segment. And mbed will of course never support them. Zephyr is not limited to ARM micros and supports also ESP32 for example.