Contrary to the conventional wisdom, borders in Africa were not arbitrarily drawn by European colonial powers. Europeans intensely studied on-the-ground conditions, negotiated with local African rulers, and learned about historical state frontiers, which influenced the border-drawing.
Source: cambridge.org