Have you written a hello world? Ever wonder why we keep doing that over and over?
Back in 1978, there was a book called "The C Programming Language" by Brian Kernighan and Dennis Ritchie. One of the first examples printed in the book was the now-famous hello, world. The book became a major reference for learning C. Since C itself inspired so many other languages, the first example followed along with it.
So why is it the first program? It did everything it needed to. It proves the compiler, runtime, and output works. There's no complexity from logic or inputs, just simple output. It's also simple for us simple-minded humans to read. Hello, world! Basically, the simplest test.
While hello world wasn't the first, it ended up being the most influential and now standardized test. In part, it's thanks to the massive influence of C. Since C influenced Unix and Unix influenced so many other things, the practice followed. Throw in a few others copying the example forward, and it spreads more and more. The example that something works: Hello, world!