But generally speaking, looking at someone else's source code almost ALWAYS triggers criticism.
Yes, and it's always considerable amount of work integrating other's code and libraries. Because it sucks, it has to provide something back. I.e., spend 10 hours to reuse work by others, save 100 hours by not having to do the work from scratch. That would be an acceptable ratio.
That is exactly why we use large libraries to do non-trivial things. This is why we use OpenCV to help with computer vision, or use existing BSD or linux networking stack.
But 99% of what STM32 HAL does, and what Cube autogenerates, is something that is written within minutes. Very typically less than 10 LoC per peripheral. And once you have done it a few times, you have already learnt the quirks. Sometimes it gets difficult but these are difficult edge cases anyway, something usually completely impossible using the HAL.
Same thing with every other vendor. westfw's requirement list above is a good one. No one ever really succeeded with it, regarding something as simple as microcontroller peripherals. The reason is, the peripherals are flexible devices offering gazillion features, but are still relatively simple to program. Worst combination for successful abstraction.
Abstraction and libraries work well when you have one simple goal, and achieving it takes a lot of difficult implementation details. This way, API is simple, like space_rocket.launch("Moon"), and doing the implementation from scratch instead would be a lot of work.
But abstracting all 57 configuration parameters of an UART through a library layer, when you can just write those parameters
directly in the registers as explained in the only existing documentation. Not going to happen, so the library only exposes "a typical case" or two, causing massive limitations on what you can do with it. This would be an acceptable tradeoff
if doing what it does was difficult, but since it isn't, I absolutely see no point. The typical case tends to be extremely simple anyway. You succeed in it using any vendors any borked library, bare metal, asm, writing ones and zeroes with a stick in sand and photographing it, whatever. This makes the reoccurring HAL discussion not worth anything. The claim that HAL somehow makes life super easy is just
because all the real challenges are elsewhere than getting UART to print characters.