In Europe (I assume everywhere) you also directly own what you have created, like a photo or code or a painting. It is not neccessary to write copyright notices on it but I can think of more reasons to do so. Like showing it is yours, or to tell everybody that it is free to use, or not.
But if there is no copyright written, and no name, nobody knows who wrote the code. And if someone copies it to other websites, it is really hard to prove.