Logging is a good example of how the opposite to what you say tends to be true. Have you ever wondered why Windows logs are so useless? It’s not windows-specific; when you look at journald you’ll see plenty of structured junk; the actually useful parts are plaintext.
“Every program as a function” would be a disaster for reliability and security. There’s a reason no mature operating system does that, apart from tiny embedded ones.