But you need to write different values to different registers in order to control the I/O and special functions of different microcontrollers. You may have a library that abstracts all that for you, but in using that you limit the range and performance of the hardware's functionality, while also making debugging more difficult as Sylvia pointed out.
Compilers for many microcontrollers also tend to implement extensions to the C standard, so C isn't always C either, if you're used to taking advantage of those extensions.
If your code accesses the device's registers directly for all hardware functions, then you know roughly what timing delays will happen. If you use other libraries, then you don't know for sure what is going on in the background that might cause unexpected behaviour. If you're only ever toggling a light on and off, then that might not be a worry, but if you're actually pushing the hardware then it becomes important.