Answer:
Mostly because the influence of European Empires.
in the past, the Africans handled their trading cities independently. This help their region generate wealth from trading with other countries.
When the Europeans Colonists (such as the Portuguese and the dutch) saw the potential that the trading cities possess, they start to made various effort to take control of them. Starting from influencing African politics , or even some direct attacks. Eventually, East African coastal trading cities started to be taken over and lose its power.