For unskilled labor, you are absolutely right.
For skilled labor though: pay is largely determined by how well you can convince management of your worth. In technology, management or really any white collar area, there are few metrics that really measure how well employees are performing, and management has to go with their perceptions to decide who is on target and who is falling behind and those perceptions can be clouded by all sorts of things that have nothing to do with how much an employee actually deserves.
You can not tell me overpriced employees don't exist; I know plenty who will readily admit to being those overpriced employees. I have no idea where you work, but I think if you take a moment to contemplate it, you'll realize that no one is paid anywhere near what they are actually currently worth to the company.
I have seen one small company where gender was a known factor in deciding which employees were more valuable. Being a small company, salaries were all over the place and they had plenty of overpriced men and a couple overpriced women (I got a lot of this from the accountant who told me nothing about this if asked in court). Luckily this does not seem to be the case across the industry.
We are also assuming throughout this discussion that men and women perform at the same level in tech careers...maybe we _should_ be seeing a pay disparity in one direction or the other and it is shocking that we don't.