To maintain control and authority over their slaves, slave masters separated slaves based on their skin hue and provided privileges to the ones with lighter skin.
After the slavery ended in the US, colorism didn't disappear. The Brown Paper Bag Test was invented by light skinned African Americans to create a hierarchy and was in common use from the early 1900s. Simply put - those who matched or were lighter than a brown paper bag passed the test and were awarded certain social privileges.
Today this elitism still exists, women of colour around the world bleaching their skin with often illegal cosmetic products risking serious side effects just to fit in an outdated discrimination system.