I take a different view. Legitimacy of occupation is subjective. Once could argue that Russia has no right to be in a region supporting a regime that uses WMD on it's people. Iran are there to oppose the Sunni forces that invaded the country and to achieve a strategic edge for a future conflict with Israel. Turkey are using the excuse of trying to eradicate an old foe instead of beginning peace talks. The US with a tiny force are occupying a huge portion of the region in support of an ally and to block direct access of Iranian forces into the region at the same time maintaining a balance with Russia who is it's main military competitor. The US presence also provides some security to Israel their other ally.
Reasons are everything.
Legitimacy is a tricky subject. Internationally it doesn't really matter whether you're a democracy or not (in point of fact most countries are not really democracies). WMD use is an interesting one, but then there's precedent. The US used WMDs with much greater effect during WWII. Saddam used WMDs and while he got hit with sanctions, he remained in power and was still recognized as the ruler of Iraq. In this case we have limited use of low-tech chemical weapons whose actual effect is less then a typical WWII carpet bombing raid. To be clear, Assad is a terrible leader, and runs one of the worst governments in the region. He makes Gaddafi look downright good. But on the flip side the US supports the Saudis, supported Mubarak in the past, generally has a history of supporting plenty of unsavory leaders. Was the US wrong in all of those cases? Are we making a principal argument that supporting a murderous regime should never be allowed? If yes, the US will be in trouble. If no, then what makes Assad special? Is killing your own civilians worse then killing civilians of your neighbors?
As is, governments are generally legitimate regardless of their form (democracy, monarchy, etc.). Typically governments can do a lot of bad things internally and quite a few externally without losing legitimacy. Assad specifically was targeted by the US along with a coalition of other countries who sought to remove him from office and part of that was an attack on his legitimacy. But this attack, as most such attacks, was opportunistic not principal and should be viewed in that context. Had Assad been pro-American you would see as few mentions of his chemical attacks on Syrian civilians as you see of Saudi bombings of Yemen civilians. Which puts us right back in the middle of the dilemma. Assad isn't going anywhere. most of the population of Syria lives in territory he controls, and indeed actively sought to leave rebel controlled areas. With Russian and Iranian backing he isn't going anywhere, and with Turkey now in the Russo-Iranian camp, the changes of him being removed from power are slim. At this point if you want to have diplomatic relations with Syria, you essentially have to have them with Assad.
Which leaves the Kurds in control of a semi-autonomous area, supported by the US, and at odds with almost every other major player. Take a look at the Iraqi Kurds and how their bid for independence led to Turkey, Iran, and Iraq to bring troops to their borders. At this point a peaceful solution for the Syrian Kurds would have to involve a) reintegration into Syria, and that's Assad's Syria we're talking about, or b) surrendering to the Turks. Any attempt at remaining independent whether in fact or in name will lead to a continued conflict. The Turks will try to crush them and Russia/Iran/Assad will let them, or even help.