Scary has hit it on the head -- from our perspective, Somalia is a big problem, but there on the ground there are loads of people profiting from the chaos and violence (or who have an incentive to continue the violence in the hopes of profiting more down the line).
There are a lot of people involved in piracy so they will never have made 'enough' money, in the same way that the drugs trade goes on and on.
The money gets distributed throughout a patronage network and the profits end up in offshore banks, or funneled into construction projects in the Gulf, or casinos, or what have you. It's a business like any other really.
The US and Europe are not going to put boots on the ground again, not after what happened last time. They are using drones against terrorist targets however.
The African Union does not have the capabilities really to take care of this on their own. Neighbouring countries are loathe to get involved -- a few years ago, Ethiopia invaded and stemmed the violence for a bit, Uganda sent peacekeepers, but they have both suffered violence and terrorism as a result.
Interestingly, one corner of Somalia Somaliland is doing quite well. So there is a lot of thought that we should give up on keeping a unified Somalia, abandon the transitional government approach, and encourage smaller governing entities to emerge. But countries can't really support this because it undermines the whole nation-state principle that is the basis for their power and legitimacy.
It's a mess, I wish there was more political will to do something but I don't think anything will really be done.