There might be other forms of immunity conferred as well. Antibodies provide immediate immunity even before the younglings immune system gets up and running. There's definitely some sharing of immune cells in the womb, who's to tell what else happens there with a long-term plan?