The White Race was invented in the 17th century. There were Imperialists in a few Western European nation states that had military and economic power. They wanted to justify the rather brutal things they were doing, and inventing a theory of racialism was a perfect way to trick themselves into not hating themselves for what they were doing.
If they believed they were part of a superior group of people, appointed by Nature and God to rule, then conquering, enslaving and killing didn’t seem so bad to them.