This is a slightly revised version of an older answer. I would not assume to discuss how fascism comes to power in general. I would also be cautious against drawing immediate parallels between the two more obvious examples (and some would argue, the only two examples).
Here I focus only on the affirmation of Fascism in Italy.
Fact is, I don't know if I can really provide you with a satisfactory, comprehensive answer as to why Fascism came to be.
There is the problem with every "why" question – that searching for the "causes" of a social and political phenomenon does lead to the, at least implicit, assumption of some for of causality relation, which is very hard to prove, or even to substantiate in a proper sense. Such an inquiry is made more problematic for Fascism since our idea of "fascism" – and even of "Fascism" to mean exclusively the Italian specie – does not exist in an isolated space but, in its historical context, developed within a pre-existing political, social and cultural environment, of which Fascism came to be a dominant element, but never operating unilaterally over it, rather in a pattern of reciprocal influences.
It is therefore always difficult to trace a neat distinction between those traits which are "fascist" and those which are expression of the environment and landscape – between the "true" characters and the "opportunistic" traits of the system developing around the Fascist affirmation.
This is not to say that an investigation of Fascism and its origins is impossible – in fact there is a vast abundance of literature on the subject – but even within the context of a significant historical (and non historical) research, outside of a substantial agreement on certain main components of Fascism and on the fact that those played a role in its affirmation, it's very difficult to provide a general consensus on "the causes" of Fascism.
Which – it probably goes without saying – does not refute the existence of a general agreement on certain fundamental traits exhibited by Italian Fascism during its affirmation and subsequent transformation into Regime. The markedly anti-socialist and "national" ideological veneer, the practical collocation of the movement within the agrarian and industrial reaction, the strong confluence towards a nationalist platform in international matters, the ambiguous character of "revolution-restoration" that Fascism devised for itself. Such elements appeared, and were noted, already during the early years of fascist expansion, when other traits of the new movement appeared less noticeable (or were noted less).
On this ground, we have many – at times diverging – interpretations of Fascism, which goes to explain the many volumes dedicated to sum up those interpretations (in Italy alone, for instance: Casucci, C. - Il Fascismo; antologia di scritti critici, 1961 – De Felice, R. Il Fascismo; le interpretazioni dei contemporanei e degli storici, 1970 – Gentile, E. Fascismo, Storia e Interpretazione, 2002). And while we can certainly agree that some deserve more credit than others, their contribution is not merely limited to their supposed accuracy but also to their historical significance, as a few of those – such as the "fascism-reaction", the "fascism-moral disease" and the official Fascist one, the "fascism as national revolution which completes the process of Italian Risorgimento" – developed during the life-time of Fascism and therefore are, to an extent, part of the phenomenon itself. Incidentally, those are also the most closely related to the nature of your question, as their core resides in an interpretation of the nature and effect of the Great War on Italian, and European society.
Unfortunately for us, even a thorough examination of those three, will take up most of this answer – but I suppose I'll end up mentioning them anyways.
For reference, and as a good starting point for a reader who isn't familiar with the development of fascism in Europe, I would suggest R. Paxton's The Anatomy of Fascism (2004) which provides a good balance between an examination of Fascism and an "explanation" of Fascism. In addition, for works more focused on Italian Fascism and its relations with liberal Italy, you may find easy to locate those of R. Bosworth.
As a last cautionary note, this answer was originally devised to approach the affirmation of Fascism from the angle of the supposed "humiliation" consequent to the diplomatic and political misfortunes of the Italian governments related to the difficult resolution of the so called "Adriatic question" – which is to say the definition of the Italian borders and position within the Adriatic sea after the victorious conclusion of the Great War, a long drawn dispute which found its main symbol in the contested city of Fiume.
I would like to caution the reader not to assume those events to have played, by themselves, a decisive role in the affirmation of Fascism. I don't. And the choice to start from there is not uncommon in literature but, for me, somewhat accidental.
It is certainly true that Fascism displayed a peculiar eagerness for highlighting and avenging all sorts of "national humiliations", from Caporetto to Adua, from Versailles to Rapallo – but those were often political-rhetorical devices, ways for a political system to organize itself ideologically, like metaphors settle our thoughts to their proper place. The effect and impact of the Fiume controversy should be read through an examination of its reflection over Italy's internal policy, rather than in their objective development. On this matter one should agree with Salvatorelli and Mira (Storia d'Italia nel periodo fascista, 1964).
The Orlando-Sonnino phase of the Adriatic question, indecisive in so far as the question itself is concerned, detrimental to the general agreement between the three European powers, was disastrous for the Italian political climate.
The public mind certainly absorbed the controversy, the clamor surrounding it, the long state of tension which kept a looming echo of martial songs in the air, and made it into a theme in its own right. But the matter of Fiume was also a financial one, and a practical one. Considering it in such light, the objective matter was unfortunate – most observers agreed – and Italy had good cause to complain, but there were more urgent things to attend to. As senator and chief editor of the Corriere della Sera Luigi Albertini (one of the most prominent liberal-conservatives and man of absolute stature among the Milanese bourgeoisie) attempted to explain in a private letter to Prime Minister V.E. Orlando (April 10^th 1919), concerning the rumors (which had already begun circulating on the press) of the Italian delegation abandoning the Conference:
Those who envisage, for Italy and the world, the perspective of a triumph of our rights achieved by means of this petty blackmail – what are they thinking? Do they really believe that the country has nothing else in mind but Yugoslavs and Dalmatia? […] Nowadays the public opinion has much bigger concerns: they see the Bolshevik stain spread with vertiginous rapidity; they see the noise of revolutionary propaganda in Italy grow to an impassable volume; they take notice of some sort of bourgeois resignation, a form of passive wake, a fondness for novelty among those who have little to lose, of mistrust in the proper functioning of the ordinary restraints; they are forced to contemplate a general state of drunkenness in which the wildest vindications follow one another without any conciliatory sentiment being able to moderate them, to a gush of general madness which may come to pass without consequences, but which might also throw everything up in the air.
Now, before we return to provide a few more details on the Adriatic question and its impact – and omitting entirely the rather abstract, but extremely interesting topic of the possible relations between Fascism and the ideas of victory and defeat – there's some good news: the Italians didn't overthrow their government. Mussolini was appointed Presidente del Consiglio by King Victor Emmanuel III in a legal fashion (well, it was a perfectly legal decision on formal grounds – as perfectly illegal had been various fascist initiatives during the previous months) on October 30^th 1922 when, at 7.20 pm, he returned to submit to the King his list of Ministers (which the King approved, with decree – passed October 31^st 1922). He had received confirmation of the designation on the 29^th – first by telephone, then (upon his insistence) by telegram – in the early afternoon, before taking a train from Milan to Rome.
On November 17^th 1922 the Italian Chamber confirmed the King's choice, passing a large vote of confidence to the new coalition government (306 vs 116) as was to be expected, and expressing the general confidence that Mussolini – roughness of the fascist methods notwithstanding – could eventually achieve those long term goals of national renovation and social pacification which had long evaded the reach of the Italian political establishment. The only dissenting voice was that of the socialists, who voted against the new Ministry.