Provide examples your favorite pieces of code throughout history, any language.
Code can be aesthetic in many ways, I don’t intend to limit responses to any particular metric. Whatever floats your boat. Bonus points for explaining what you like about it.
That code is beautiful because I never have to look at it or tinker with it.
(For those wondering about security, it is deployed in containers that are destroyed and rebuilt from patched images on a daily basis. It does not use any web-hosted libraries.)
Pretty much any code or pseudocode written by Donald Knuth.
Physically Based Rendering
Both books are outstanding examples of readable literate programs.