Scarification, from what I’ve read, originated in Africa hundreds of years ago. The Africans were attempting to make themselves unappealing to Arab slave traders. After some generations, tribes had adopted certain scaring designs, and it became known as tribal scaring, which is still common in sub-Saharan Africa.
Still does not preclude that it is a mental illness. Cultural practices do not get a pass when indicated that some people are just screwed up.