It is not impossible for a government to act as a mafia (see Russia). But I believe it's impossible for a mafia to be a functional government, they are just built on different grounds.
For me a functional government has the wellbeing of its citizens as a mission. There might be different opinions on how that would look like (hence democracy) but the idea is that; once the government is unchangeable and only cares about maximising the profits of its cadre then it starts becoming more and more like a mafia, just a legalised one.
At the scale seen in Palermo (though not only Palermo, by any means) it is effectively a government (and this point is an element of the article), but without a constitution (unless you count "submit to violence" as one) and sustained economically by extortion, corruption, and drug- and human-trafficking.
Lest this seems smug, let me say that, with SCOTUS struggling to find anything wrong in the events of January 6 2021, I am not feeling at all smug.
For me a functional government has the wellbeing of its citizens as a mission. There might be different opinions on how that would look like (hence democracy) but the idea is that; once the government is unchangeable and only cares about maximising the profits of its cadre then it starts becoming more and more like a mafia, just a legalised one.