And yet, not once, but twice in the mid-1970s, the Court held that policies that discriminate against pregnancy don’t discriminate against women because not all women are pregnant all the time. The idea was that women who aren’t pregnant would be treated just like men, so there was no discrimination. Plus, pregnancy had nothing to do with stereotypes about femininity or female incompetence, so pregnancy discrimination, the Court reasoned, wasn’t a cover for some deep-seated hatred of women (there’s room for disagreement on this point but the court didn’t acknowledge it).
Only after Congress stepped in to pass the Pregnancy Discrimination Act, in 1978, did the courts come around. This time, Congress was explicit about what should have been obvious. As Senator Jacob Javits put it at the time: “It seems only commonsense, that since only women can become pregnant, discrimination against pregnant people is necessarily discrimination against women.”
Source : http://www.slate.com/articles/news_and_politics/jurisprudence/2012/03/could_women_really_be_discriminated_against_for_taking_birth_control_if_a_crazy_arizona_bill_passes_yes_.html177