Warfare exists independently of economic efficiency. Colonialism would have happened regardless of technological advancement.
As the story goes, no Dane set foot in the african interior. We instead assisted the already warring factions with technology allowing them to subject more people to their war.
I think it's hard to envision how any of this could have happened without those wars.