To me (and, I suspect, to Gitlab), "underrepresented" means "present in lower proportions than in the general population".
South Africa, to use one of your examples, has a majority Black African population (80%), but business management is overwhelmingly White[1] (67%).
That means Black African people are simultaneously the majority of the country and also underrepresented minorities that struggle with systemic, institutional racism.
"Underrepresented" is in parentheses. So I'm interpreting this as saying that the policy is not specific to members of underrepresented groups, but was crafted with underrepresented groups in mind.
I think it does matter whether you're a member of a group that is mistreated as a group vs. whether you are mistreated as a person; it's easier to be confident that you're understanding the situation correctly if there's a lot of data about an entire group vs. a claim that you individually are unsafe/mistreated (which could just be "I am mistreated because my community is ostracizing me for having committed a crime" or whatever). It is obviously possible to be mistreated as a group even if you are from a local-majority group (cf. apartheid in South Africa).
As to why they mentioned it even if it's in parentheses - there's a link to a page, and elsewhere on the page they mention that it's a cultural value to include more people from "underrepresented groups" in their definition (https://about.gitlab.com/company/culture/inclusion/#gitlabs-...).