In an ideal world, If two people have the same job and have the same skills and bring the same amount of internal knowledge to the company they should be paid the same. Their salary shouldn’t be affected by their negotiation ability.
As far as women not applying, that’s the classic pipeline problem. You have to get women to apply.
Also if jobs come from referrals, if men mostly know other men, they are going to recommend other men.
That’s the whole point of systemic $x-ism. The HR department is not purposefully excluding women and people are not purposefully referring men over women.
Anecdotally, working at small companies for over 20 years, I’ve only worked directly with 5 female developers that I know well enough to refer. When I was hiring contractors for a small department, only one female applicant came across my desk in over a year.
On the other hand, I worked with one female developer who was very good but didn’t want to leave for more money because of work life balance reasons and she had small kids. I’m well aware that women more often make that choice than men.