Sang-mele means “half-blood” and was used generally for people considered mixed-race. It’s not a legalism, it was a common name to call people not considered white. Calling someone with 1/64 african ancestry “sang-mele” would be deeply committing to a racist idea of “White purity”.
There really is no “maybe” about these terms when it comes to why they were used. They were used to call people “not-white” both legally and socially, in support of the racist belief that some black heritage made a person inferior.
Octoroon and Quadroon gained currency in English because of slave-traders, and were kept in people’s vocabularies because of later racist State laws designed to separate “non-whites” from “whites”.
It’s always been a racist framing, and people used it for racist purposes. The terms didn’t self-form from happenstance as a neutral legal nicety.