Quite possibly nobody thought in those terms.
For gold
Gold.
there was lots of gold scattered around Africa and Africans grow sugarcane which is sugar. also they could get to India easier that way
railroad
This is because the majory of people living in it known as unionist want to remain part of the UK. At one stage the whole island of Ireland was part of the Great Britain because the king at the time took control. As time went by only the nothern end of this island wanted to remain part of Great Britain called Ulster.
South Africa was colonized by the British because they wanted a trading port. The southern tip of Africa was a great place to set off on expeditions.
The British wanted to construct the Suez Canal in order to sail to Asia without having to sail around Africa. The canal became a vital part of the British Empire because it created a strong link between India and Europe that allowed Britain to maintain control of its overseas possessions.
they covered the prehistoric part
Gold and Diamonds
The British Empire traded mostly within itself. There were over 50 countries within the Empire, with food and raw materials imported from them and manufactured goods being exported to them.
What about it do you want to know.
The British wanted to control South Africa because it was one of the trade routes to India.