Somalia collapsed for a variety of reasons. The country was a military dictatorship with no adequate balance of power. There was no bill of rights, independent judiciary, journalists, or any viable paths to change the political leadership of the nation. So a violent, localised uprisings became the only means of political change.
After the failed war to liberate Somali Galbeed, Barre increasingly relied upon his clan for political support; further alienating the population and driving them into the arms of rebel groups. This also had a secondary effect of incompetent individuals taking control of important state institutions due to clan affiliation. The economic stats from 1980s onwards highlight the governments disastrous policies and misplaced priorities.
Finally, the political and material support of rebel groups by Ethiopia cannot be understated. Mengistu leveraged these clan militia to destroy Barre's regime. This combined with the end of the Cold War meant that the Somali government was bankrupt and could no longer fight for control.
The collapse cannot solely be blamed on qabilism. However, the inability of different clans to compromise post-collapse can be. Somalia had a real chance of ushering in a new government but this was swept to the wayside because of the politicisation of clan identity. Why fight for a whole Somalia when you can just create a clan-based government? Hence, Somaliland seceded, closely followed by Puntland.
The answer is complicated.