Morning sickness in pregnancy appears to be unique to humans, and it seems that women with more severe morning sickness have a lower rate of miscarriage. There are two main theories to explain why we might have evolved this.
The first is that the nausea is commonly associated with an aversion to meat and strong tastes, and this might be a way of steering the mother away from foods that might cause food poisoning, especially early in pregnancy when the foetus is most vulnerable.
The second theory is that morning sickness is caused by the hormones secreted by healthy foetuses, which are important for building the placenta in the first trimester. In that case, the nausea is just an unfortunate side effect of these hormones, and the advantage is an indirect one.