No, you can't legislate racism and sexism out of society. It's a bad solution to a bad problem, but I don't have a better one. I'd suggest education, but I'm not sure schools can undo the damage a sexist, racist upbringing can do.
But I'm amused by the WASP crybabies who feel it is so unfair to them, as if those laws really made that much of a difference in their lives.
If a company would've hired me but can't because of some government imposed quotas, it sucks; but I'll just take the next offer, no big deal. A company that can't figure a workaround or exploit some loophole or another (hire as a consultant or contractor, etc.) is probably not a wise career choice anyway.
Every year, I turn down unsolicited offers for work. I really doubt that I'd have to turn down that many people if I was either a woman, black, mexican or muslim or part of any other "visible/audible" minority. I'm probably lucky atheism has no outward signs.