I'm disheartened bans like this even need to happen in the first place -- companies should really reconsider hiring anyone they'd feel like they have to ask this sort of stuff to in the first place (Conversely, any company that ask this sort of stuff of their teammates should be places you should avoid working for).
All it takes is one person to sue for discrimination because their profile says they're gay / disabled / pregnant / a veteran / etc, and the employer has no way of proving that wasn't the reason for passing them over.
This is the same reason smart employers will never ask you questions about those topics in an interview. It's too hard to defend accusations of discrimination if you happen to discover that the candidate is in a legally protected class.