Why aren't include guards in c++ the default?
c++
Solution
The behavior of a C++ compiler is specified in terms of how it handles each translation unit. A translation unit is a single file after the preprocessor runs over it. The fact that we have a convention of collecting declarations in certain files and calling them "header" files means nothing to a compiler or the C++ standard.
Simply put, the standard doesn't provide for "header files" so it can't provide for automatically include guarding header files. The standard only provides for the preprocessor directive `#include` and the rest is merely convention. Nothing stops you from forward declaring everything and not using header files (except pity for whomever should have to maintain that code...).
So header files aren't special and there's no way to say "that's a header file, guard it", but why can't we guard everything that gets `#include`'d? Because `#include` is both more and less powerful than a module system like other languages have. `#include` causes the preprocessor to paste in other files, not necessarily header files. Sometimes this can be handy if you have the same using and typedef declarations in a bunch of different namespaces in different files. You could collect them in a file and `#include` them in a few places. You wouldn't want automatic include guards preventing you from doing that.
Using `#ifndef` and `#define` to conditionally include headers is also merely convention. The standard has no concept of "include guard". (Modern compilers however actually are aware of include guards. Recognizing include guards can allow faster compilation but it has nothing to do with correctly implementing the standard.)
Getting pedantic
The standard does liberally use the word "header", especially in reference to the C and C++ standard libraries. However, the behavior of `#include` is defined under `§ 16.2 *Source file* inclusion` (emph. mine) and it does not grant any special powers to header files.
There are efforts to get a proper module system into the C++ standard.
Problem
I use `#pragma once` (or you use include guards à la `#ifndef...`) basically in every header file in my c++ projects. Is this a coincidence or is it what you find for example in most open source projects (to avoid answers that rely only on personal project experience) . If so, why isn't it the other way around: If I want a header file to be included several times, I use some special pre-processor command and if not I leave the file as is.