Morning sickness, also called Nausea and Vomiting of pregnancy (NVP) is the most prevalent medical condition associated with pregnancy. Studies put the numbers of pregnant women affected at between 50 and 80 percent. Symptoms are persistent, and range in severity from mild nausea to the most severe form of vomiting, known as hyperemesis gravidarum (HG).
“The etiology of nausea and vomiting of pregnancy is unknown. Various theories have been proposed, including a psychologic predisposition, evolutionary adaptation, and hormonal stimulus. The question of whether certain personality types or specific psychologic disorders predispose someone to hyperemesis gravidarum has been raised in the literature for many years.”
Source: Practice Bulletin No. 153: Nausea and Vomiting of Pregnancy Obstetrics & Gynecology 126(3):e12–e24
Although it's seems certain that hormonal changes bring on the symptoms (particularly changing levels of the hormone human chorionic gonadotrophin) no hypotheses of how or why this debilitating condition might have evolved have been investigated in controlled medical studies.
Further info : Nausea and vomiting of pregnancy and resource implications: the NVP Impact Study British Journal of General Practice, 2019; 69 (680)