It's less WWII as a war, but what happened in the Third Reich of course. Just take Adorno's famous: "To write a poem after Auschwitz is barbarical." I'm not an expert on Adorno, so I won't go into an interpretation of this, but in general there are several aspects of why many (particularly European) artists felt unable to "just continue making art as if nothing had happened". Art had always stood in a certain relationship to society, maybe reflecting aspects of it, maybe putting forward certain visions, etc. It did this in a stylised, aesthetic form that was, in some form or another, intended to be "enjoyed". What happened in the Third Reich was, by those who witnessed it, often not just recognized as a "tragic incident", but seen as a failure of society, even humanity itself. Art, as an aspect and manifestation of society, was thus seen as irrevocably corrupted - and even more so in its practice of "reflecting reality in a beautiful way". Any "art created after Auschwitz" would, in this sense, either have to ignore this aspect of history and humanity and would be untruthful and false, or would have to reflect on said happenings in the only way possible for art: In a stylised, abstract way, that would never be able to do the horrors that happened justice and would actually desecrate those who suffered during that time, by the attempt of doing so.
If you held these views (and quite a few did, while others quite as vehemently opposed them), it was clear that the only way to continue creating art in some form was to sever art from its corrupted traditions, from the expectations of society, from the claim of "representing humanity" in any emotional form., and from the intention of "pleasing" aesthetically, but to draw back to a more abstract level where more "objective" processes (structures, numbers, techniques) that weren't so "laden with guilt" ruled. As weird as it may sound today, but some of those structural tendencies of that time had quite ethical reasons.
To even try to "express the degree of hopelessness and despair" as you mentioned would have seemed criminal (or, as mentioned, barbarical, for Adorno) for quite a few intellectuals and artists back then. This was certainly much less the case in some countries that were a bit more distanced to this, such as the U.S. and was, as mentioned, definitely not shared amongst all Europeans - but it may serve to explain why some went in the directions they did and were very polemical about this. Many people today, ignoring this general atmosphere in central Europe at that time, can not understand things like Boulez saying "Before me there was no music". But such phrases have to be read in a certain historical context.
And while I do of course now live in a different time and have quite different views on art, society, the value of beauty etc., I -do- definitely share the scepticism about works of art that seem to (often not even deliberately) exploit happenings such as the Third Reich/WWII to gain greater public effect. Penderecki's "Threnody for the victims of Hiroshima" first didn't have this title and Penderecki sent in his piece to several competitions without any success. After he had then given it that title, it immediately won a competition and was a quick success in public. Similar things can be said about Nono's "Ricorda cosa ti hanno fatto ad Auschwitz". And I'm in no way attacking Penderecki or Nono with that - just pointing out the implications such charged associations can have on a piece of art and its reception. And from this point of view I can definitely comprehend Adorno's criticism.
P.S. I'm of course in -no- way saying the 1950s serialism was a direct and only result from political and philosophical considerations. I just wanted to mention this aspect because it often seems to be lost amongst the more obvious technical considerations, i.e. the general modernist drive for exploration, for doing things in a new way. It would definitely be wrong to reduce the bloom of serialist composition to the discovery of techniques that made it possible however. Algorithmic composition is almost as old as composition itself. It always existed either as a structural aid, as a way of reflecting a "divine" non-human aspect in a piece of music as in many renaissance and baroque pieces, as an enjoyable "game", such as in experiments by Mozart and others, and so on. But it needed certain changes in society to really break through and become a value in itself, without the help of "nice c-minor triads". So sure, in reply to your last question: A little of both (and more), as almost always.
Oh, and Tokkemon: I don't think the fact that serialism has receded has anything to do with computers and new possibilities in algorithmic composition. Serialism by itself doesn't have to be complex at all (it's actually often very simple) and it certainly doesn't need to have anything to do with mathematics (just using numbers and structures doesn't really constitute a "mathematical" process). And obviously computers haven't lessened the impact of -algorithmic- or highly structural processes at all. Why should it matter how easy it is to do with or without computers? The only question we today have that we didn't have in the 50s is whether we want to use a computer in our compositions (algorithmic or otherwise). Both is done widely - but that's merely a question of work practices and efficiency, not really of compositorial aim.