The primary destabilising force in the Horn of Africa in general and Somalia in particular is the US. The explosive spread of militarism is rooted in the deepening crisis of US capitalism. As the economic foundations of the United States claim to global hegemony weaken, Washington is driven to ever greater reliance on its residual military superiority. Somalia provides a case study in the immense destruction and human suffering produced by this policy.
US actions in Somalia over several decades have left the country a chaotic, lawless hellhole, where about 1 million people are internally displaced and around 3 million rely on food aid. The lack of a functioning government acceptable to the population has forced many to turn to the Islamists for some semblance of stability and order, however brutal. The US administration has scant regard for the suffering it has unleashed and regards Somalia as merely another theatre in its phoney "war on terror."
It's all about the resources, folks.