Answer: racism became one of the ideas supporting imperialism. It was linked to other ideas as well (superiority of reason over feeling and sentiment, concept of European powers as racional and naturally progressive, idea of progress as a typically European idea, equation reason = progress). Other races were usually (in the best case) infantilized or barbarized. Behind all that was a belief that there is a historical law (inevitability) of European whites being a dominant race bringing others to rationality, civilization, progress. All that made imperialism much more powerful. It led to conviction that the imperialism is inevitable historical law.
Explanation:racism as scienfific doctrine (biological determinism resulting in cultural relativism) is a product of 19th-century thought inspired by Darwin and leading to social Darwinism of Herbert Spencer, Ernst Haeckel and others. But already in 18th century there was a belief (it means rather philosophical perspective and attitude than scientific theory) that certain races are made of inferior material (idea quite common between men of Enlightenment like Thomas Jefferson).