My wife and I have this discussion all the time (she's pretty rational).
The thing is that in a lot of industries, and in tech in particular, salaries are negotiated. Sharks and more aggressive personalities always come up ahead with that.
We saw it pretty straight when at one point, she applied for a job in the same department as me, for the same company (we wouldn't work together, but we shared the same department director).
I have more experience than she does, but she has better credentials...roughly a wash. She interviewed a bit better than me. We got a similar initial offer (she got a HIGHER initial offer, and rightly so).
Here's the catch: I refused mine initially. They came back with counter offers, we negotiated for a few days, and I came up way ahead (20%~ higher or so). Even KNOWING this, when my wife got her offer, she just took it as is, no negotiation whatsoever.
Net result: she made about 10-15% less money than me even though she was more qualified.
At the end of the day, hiring managers have budgets and they will try to pay as low as possible without hurting employee moral/retention, and they do expect some level of negotiation. If you take the first offer, you'll be paid less. And less "pushy" individuals are more likely to not negotiate.
That's not the only reason for gender salary gaps, for sure. But its a FUCKING BIG ONE.