Discrimination is illegal.
Companies can't just do whatever they want. They are bound by laws and ethics. If these policies are found to discriminate against rape survivors (for example) they could very well be ruled illegal.
Don't confuse a legal grey area with something being legal.