Often these "rules" extend to conduct far outside of the purview of a project - typically crossing into identity politics.
"If you espouse views I don't like on your personal Twitter, you can't contribute to this entirely unrelated software project."
I mean, that probably depends on how extreme are the views? If you write a blog post about there being too many colored people in London, how are non-white developers supposed to collaborate with you?
This can sometimes, in practice, be reasonable. If letting muh_dick_1488 open PRs means everyone else stops contributing, well, you're gonna have to pick a group to keep.