No, it's not illegal because HR departments usually set wages based on a formula that has A LOT of wiggle room. This is really a multi-pronged problem.
1) Men are more likely to negotiate, in part because their demands are met more positively than those from a woman. Some of this is just sexism and fear of women…