> "Give me a random number" feels like it shouldn't require all this overhead and hidden complexity under the hood.
It doesn't. The libc is the real problem. The libc and its global state. Even something as simple as errno creates global state problems just like this one. There are buffers all over the place.
Freestanding C is a better language just by virtue of not linking against libc.