Why can't the immune system start at the mating time?
These questions are not completely easy to answer, since the immune reaction in this area is not completely understood. There are two different mechanisms  which play a role here: 

Semen is immunogenic and can cause the generation of specific antibodies against it in men and women. The main question here is if the presence of semen in the females reproductive tract is the consequence of a suppressed immune reaction or because it is not recognized. There are indications for both possibilities but I think the first is a bit stronger. The mucus from the vagina is immunosuppressive as well as the seminal fluid, which contains prostaglandins which have the same effect. Have a look at this article for some more background: 


Sperm survival in the female reproductive tract: presence of
immunosuppression or absence of recognition?


For the situation in the uterus between mother and fetus the situation is better understood. This is the so called immune privilege of some tissues (among them are the uterus, testes and the eye) where immune reactions are suppressed.

The placenta forms an immunologic barrier which seperates mother and fetus. This is done by secreting immunomodulary substances and also by the subpression of some T cell subpopulations. For more details see here. This is a highly developed system to protect the developing fetus (which is foreign) from the mothers immune system.