The vast majority of Mongols are not lactase persistent genetically like Northern Europeans. They're even less lactase persistent than us by a wide margin, last I checked. Yet a fair number of Mongols and even Han Chinese report being able to consume a significant amount of dairy without issues. There is evidence in the literature I've seen over the years that populations overtime develop the proper gut microbiome for digesting certain things like the Japanese with seaweed and our ancestors and Mongols with raw milk. If I'm not mistaken, I don't genetically carry many of the markers for lactase persistence yet I can chug a gallon of milk, raw or pasteurized, and feel absolutely normal throughout the day after with no diarrhea or anything like that.
It's the gut microbiome. Somalis who have trouble with dairy are most likely damaged in some way in that respect. Most people are, to be honest. I remember reading how there were so many strains of things like lactobacillus that are heavily depleted in modern people compared to before due to things like SAD type diets, microbiotically compromised mothers and birthing through methods like c-sections. Sad stuff.
Also, another thing to keep in mind is that a lot of pastoralist populations didn't historically just chug raw milk. Our ancestors, including the ancestors of groups like the Mongols, the Maasai and even the Bedouin very often fermented milk into things like yogurt and sourmilks which heavily depleted the lactose and left you with the protein, fat, vitamins, mineral and probiotics.
A lot of the milk was also used to make butter, ghee and in the case of some of these cultural groups cheeses as well.
Camel milk was historically pretty much impossible to make cheese from so cheese wasn't much of thing across the Sahara and for Somali nomads but the rest like sourmilks, yogurts, butter, cream and ghee were very, very common. And one thing all of those things have in common is little to no lactose. If you've left raw milk to ferment for 2-3 days then there's probably only trace amounts of lactose left and almost nobody is THAT sensitive. Same goes for butter, cream and even more so with ghee.