Boundaries defining African countries were an arbitrary creation. Some follow natural landmarks, such as rivers.
They were drawn on maps at conferences in European capitals. Colonialism lasted about 100 years [1870-1970], with some holdouts, notably Zimbabwe (1980).