Quoting from the thing you quoted:
a master of obfuscation can make header files declare different things depending on how many times they are included
The author here is assuming you include this file multiple times. In other words, you might have a file that looks something like this:
#include "that.file.in.your.question.h"
#include "that.file.in.your.question.h"
#include "that.file.in.your.question.h"
The first time, the flow is as you describe, causing ONCE
to be defined. The second time, because ONCE
is now defined, it takes a different branch (the one where TWICE
is defined). The third time, because TWICE
is defined, it takes yet a different branch (the one where DONE
is defined). Finally, the fourth time, and any time thereafter, because DONE
is defined, the whole thing is skipped. That is unless of course some other preprocessor directive undefines DONE
.