The mess in the middle east is largely of the West's making (US and UK). We financed what became ISIS during the Afghan war to fight the Russians. We interfered with Iraq to remove Saddam Hussein for our own economic interests (interestingly Saddam Hussein protected Christians) now the place is one bigger violent cess pool than it ever was under Saddam. We helped the Libyans to rise against their government, creating a power vacuum, giving ISIS another territory in which to flourish. When the terrified population try and make their escape to Europe, from the hell we helped create, we have journalists like Katie Hopkins saying those immigrants are cockroaches and we should set the gunships on them (at least the UN waded in on that one and rightly pointed out that this was the same kind of language used in 1930s Germany and 1990s Rwanda).
And then, as you say, there's Syria who shares an interest in defeating ISIS, so to that extent Bashar is useful to the West, though they can't officially be seen to work with him to defeat them.
The whole thing is one big tsunami of violence with no obvious solution. Yes the UN model is not working in this situation, but I think the problem is too big for it to deal with when the cause of the problems are its most influencial and powerful members. The hell that the people of Syria are going through is probably seen as being the lesser of the evils when taking ISIS into consideration.
I guess none of us know the true story and all of the causes - we only know what we read and watch - but I don't see this as something for which the UN can realistically do anything to bring it to an end - and until someone comes up with an alternative model to the UN, there isn't an easy answer. (This is where the JWs would say "what we need is one big world government" ). Meanwhile we feel distressed and impotent at the suffering we see in that region and, if we're from the US or Europe, more than a little ashamed that the lack of solution probably has something to do with protecting the lifestyle we currently enjoy.