Multiple definition of a variable in a multi-file sketch

However, I don't understand why the #ifndef-#endif construct in the header file did not prevent multiple variable definitions when that header file is included in multiple files.

Isn't that the purpose of the #ifndef-#endif construct?