Imperialism and colonialism are older than human history, and across the centuries virtually every culture in every part of the world practiced it.
Until the Enlightenment of the 1700s. At which point a few voices began arguing that we should only trade with people rather than conquer them and take their stuff — and that human rights are universal and to be respected everywhere. A few voices gradually became a widely shared ethos, then a movement, and then changes to official policy and practice in the 1900s.
Keep in mind that 200 years is a blink of an eye in human-historical terms. It normally takes many centuries to change cultural mindsets and long-established practices. The Enlightenment’s liberalism and capitalism relatively quickly undercut and did away with millennia of conquest-and-control baked into human traditions.
The great liberal capitalist Mises put it best in the early 1900s, confronting his generation’s traditional conquer-and-control politicians and ideologists:
“The whole Idea of colonial policy was to take advantage of the military superiority of the white race over the members of other races. The Europeans set out, equipped with all the weapons and contrivances that their civilization placed at their disposal, to subjugate weaker peoples, to rob them of their property, and to enslave them . . . If, as we believe, European civilization really is superior to that of the primitive tribes of Africa or to the civilizations of Asia – estimable though the latter may be in their own way – it should be able to prove its superiority by inspiring these peoples to adopt it of its own accord. Could there be a more doleful proof of the sterility of European civilization than that it can be spread by no other means than fire and sword?
“No chapter of history is steeped further in blood than the history of colonialism. Blood was shed uselessly and senselessly. Flourishing lands were laid to waste; whole peoples destroyed and exterminated. All this can in no way be extenuated or justified. The dominion of Europeans in Africa and in important parts of Asia is absolute. It stands in the sharpest contrast to all the principles of liberalism and democracy, and there can be no doubt that we must strive for its abolition. The only question is how the elimination of this intolerable condition can be accomplished in the least harmful way possible.” (Liberalism, pp. 93-94)
Related:
The Enlightenment Vision chart.
Also note that the Enlightenment of the 1700s was the era in which movements arose to abolish slavery and the second- or third-class status of women.
More on Mises, especially his critiques of socialism and fascism.