So the countries can process goods themselves because processed African good are harder to ship.
It takes more money to ship the goods, so they need to charge more. Plus, most countries want people to buy what they produce, not what other countries produce, so they tax (or put a tariff on) other countries goods so that people will be more likely to buy their stuff, aka the less expensive product.