“Consider a man and a woman each with a productivity of $10 per hour, and suppose, because of discrimination or whatever, that the man is paid $10 per hour and the woman is paid $8 per hour. It is as if the woman had a little sign on her forehead saying, “Hire me and earn an extra $2 an hour.”
This makes her a desirable employee even for a sexist boss. But when an equal-pay law stipulates that she must be paid the same as the man, the employer can indulge his discriminatory tendencies and not hire her at all — at no cost to himself.”
http://mises.org/daily/1466
Walter Block has several pieces that address this sort of thing. Search mises.org for his articles and videos on affirmative action; the logic is the same as for equal-pay legislation.