My company works off pay scales & grades where your pay increases slightly in line with performance, what roles you can perform, your value to the team etc. So everyone will earn a slightly different salary - e.g if you're a grade X your pay bracket is 27-34k.
If you add all the mens salaries together and all the womens salaries together, there would almost certainly be a bias in favour of men or women. Does that mean my company is deliberately paying one gender less? Of course not, otherwise they'd only hire that gender.
Another point that nobody mentions is that a lot of women will be content in their current roles because it's easy, stable work and it allows them to provide for their family. If you've been at the same place for years, you're earning good money and your partner is as well, there's little need to look for another job. Why take the risk of spending less time with your kids or the chance of failing probation? I know this is gender stereotyping a bit and i'm sure men get affected by this too, but if you look in any non management job most of the "lifers" will be women.