This avoids issues like #35737 from passing CI in the first place.
Also, the rule can help to avoid ODR issues, according to https://clang.llvm.org/extra/clang-tidy/checks/fuchsia/header-anon-namespaces.html
This follows https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header