Somalia has government in the sense of different states have governments that view themselves as independent from the rest. They collect taxes, have an armed security force, and generally do all the normal things a state would do anywhere else in the world. The only difference is that the only officially recognized govt by the world is the TFG in Mogadishu, which actually has less control and actual governance than your average HOA in Podunk, Kansas. Couple this with high corruption, lack of effective governance in large swaths of the country, constant war for power everywhere, pirates with cameras shining on them on the high seas, complete enmity between the major states, and constant meddling by too many outsiders to count and you have the reason why there is no central government that rules over Somalia proper till now, more than 20 years after Barre's fall.