It doesn’t matter whether the employer is discriminating out of pure misogyny or because they want to avoid a hassle.