I learned in history class in highschool that, after Leopold II of Belgium claimed the Congo for himself, the Berlin Conference happened, at which the various European great powers divided Africa among themselves. I'm not sure that I ever learned how it was decided who got what - for instance, why did Portugal want Mozambique and Angola, why did Spain want the Western Sahara, why did France get most of West Africa, etc.? Furthermore, there were some European countries that, to my knowledge, didn't get anything from the conference - Austria-Hungary, Sweden and Russia were notably absent in terms of their African colonial empires in the 19th century.
Well lets get one thing straight.....contrary to popular belief and with the exception of King Leopold, the Berlin Conference did not decide which European nation got what. But rather how in the future it would be decided who got what. According to historian Thomas Pakenhan in The Scramble for Africa "It was Berlin that precipitated the Scramble. It was Berlin that set the rules of the game. It was Berlin that carved up Africa. So the myths would run." The overt purpose of the conference was to manage the ongoing process of colonization in Africa and was a part of, not the cause of, the Scramble for Africa.
Before I get into the body of this you might want to read a recent post I wrote about Leopold II and his ownership over the Congo.
Europeans have always been involved in Africa since the 16th Century establishing trading posts along the coasts for resources and trading for slaves. By the latter half of the nineteenth century Africa became of greater interest to Europe, as Europeans sought more resources to fuel their nascent industrial revolutions. But as I said previously the Scramble for Africa had been ongoing well before the Berlin Conference in 1884. Germany, late to the game, had been conducting its own exploration of central Africa looking into areas such as modern day, Cameroon, Tanzania, and Namibia. Britain, ever present, had as recently as 1882 had taken on a larger role in Egypt to secure the vital link to India, the Suez Canal, Leopold II had already been staking his claims in the Congo, (with the help of Henry Morgan Stanley who famously never asked "Dr. Livingstone I presume?"). In addition in 1883 Britain and Portugal concluded an agreement that gave Portugal effective control over the mouth of the Congo River, locking up the interior of central Africa to one nation.
With all of these competing and conflicting interests Germany and France had been discussing, over the course of 1884, an idea for a conference to hammer out these issue. They came up with a working agenda- 1) Freedom of commerce in the Congo Basin 2) Free navigation for all nations on the Niger and Congo Rivers 3) How new colonial claims on the African coasts might be determined. Over three months 14 nations deliberated and the end result was the General Act which contained 4 Declarations and 2 Acts of Navigation arranged in 7 chapters and 38 articles. These nations,
"...in a spirit of good and mutual accord, to regulate the conditions most favourable to the development of trade and civilization in certain regions of Africa, and to assure to all nations the advantages of free navigation on the two chief rivers of Africa flowing into the Atlantic Ocean; BEING DESIROUS, on the other hand, to obviate the misunderstanding and disputes which might in future arise from new acts of occupation (prises de possession) on the coast of Africa; and concerned, at the same time, as to the means of furthering the moral and material well-being of the native populations..."
So nice....anyway the conference ultimately decided that there will be free navigation on both the Niger and Congo Rivers like that on the Danube, Rhine and St. Lawrence Rivers, there should be free trade within the Congo Basin, curb and end the overland slave trade in Africa, declared the neutrality of the territories in the basin of the Congo, and established uniform rules to future occupations on the coast of Africa. The General Act of the Berlin Conference did not, as you can see, partition Africa, but it also wasn't irrelevant to that process. It served to only encouraged European powers to extend their claims in order to strengthen them.
So the conference outlined how Africa, in the future, would be partitioned. And indeed over the years Africa was partitioned through treaty, international recognition, and sometimes through acquiescence (see my post about the Congo).
But essentially you are asking why did certain nations get control of certain areas. Well because the Conference established the concept of Principles of Effective Occupation. Essentially a nation could acquire rights over a colony only if they possessed "effective occupation": if they had treaties with local leaders, flew their flag there and established an administration to govern it with an armed force to keep order. But we have to disabuse ourselves of the idea that each European nation maintained absolute control over these vast African territories. Oftentimes, like in the case of Italy and Britain in Somalia, European nations served as protectorates over the local governing authority. If we look at Portugal in Angola and Mozambique they established control over the coastal areas only and maintained the most minimal contact in the interior. Its really not until the early twentieth century did Europe begin to effectively control the interior. Its these areas that ultimately led to the most disputes.
Portugal had long claimed both the Mozambique and Angola coasts but had little to no control over the interior. Portugal sought a contiguous transcontinental territory linking Angola>>Zimbabwe>>Zambia>>Malawi>>Mozambique. Britain outright rejected Portugal's claims to link these two colonies and in 1890 issued an ultimatum to Portugal to vacate the disputed territory. Both sides eventually agreed to a treaty, where which went through multiple drafts and one draft met so much opposition in the Portuguese Parliament that it dissolved. In the final version Portugal gave up some their claimed territory in Zimbabwe in exchange for extra territory in the Zambezi Valley, Angola's borders were set and free navigation was established along the Shire and Zambezi Rivers.
Italy had initially begun exploration of Somalia in the 1870's but further extended its interests in the post-Berlin Conference years. They made several treaties with the local sultanates establishing them as protectorates of Italy. Italy vowed to remain out of the internal administration of the sultanates accept some subsidies. While Italy in return would provide minimal oversight and economic concessions. Eventually by the early twentieth these protectorates were annexed by Italy. Britain had also established treaties with the northern Somali Sultanates establishing them as protectorates. Subsequent treaties between Britain and Italy reaffirmed the borders of their respective areas of control in 1894, 1906 and 1925.
Read my earlier post about why and how Leopold was able to claim the Congo.
As you can see from the above examples (with the exception of the Congo) control of these territories was decided after the Berlin Conference
But why then is the Berlin Conference associated with the partition of Africa? None of the General Act's provisions layout any direction on which territories should be parsed out and to whom and the General Act was never confined to the conditions of which it was negotiated nor did it remain formally effective for long. It only setup a system of how European nations should inform others of their "effective occupation" after they had occupied it. It was in a sense a rather toothless document but an important step in the development of international law. But rather the conference itself represents late-19th Century imperialism and provided an ideology for the continued expansion of colonial rule.