His motivation makes perfect sense if you set aside the moral abhorrence of the act.
But first, let’s examine why gas was used in the first place - to break the stalemate of trench warfare in WW1. Barbed wire, machine guns, accurate heavy caliber artillery made frontal attacks extremely costly in terms of casualties and pretty much doomed to fail - the developed rail network of NW Europe enabled defenders to bring reinforcements faster to threatened sectors that attackers could.
Now why was gas not used in WW2? (actually it was used by the Germans in Crimea in 1942 but that was an isolated occurence). Many fanciful explanations were provided, some claiming that Hitler, being temporarily blinded in a gas attack in WW1, showed reluctance to use it, but that’s bullshit.
The reasons are very unsentimental - first of all, the Allies very ready for such an eventuality - every GI carried a gas mask and huge quantities of gas were prepared for possible retaliation, but the main reason was horses - despite all those propaganda newsreels and advanced weaponry, the Wehrmacht was entirely depended on horse drawn carts. Over one million horses was employed by the German Army and any retaliatory gas attack by the Allies would have killed off the horses, thereby immobilizing most of the forces except those few fully motorized divisions.
But back to Assad - as I’ve said, gas is used to break stalemates and reduce casualties - something Assad desperately needs, because he can only lose in prolonged attritional warfare.
Assad’s Alawites made around 11% of Syria’s pre-war population, Christians were at 10% - add to that a smattering of secular Sunnites and you see that Assad forces are at a huge numerical disadvantage, which prevents him for providing sufficient cannon fodder for costly urban fighting.
I’ve already shown that the male Alawite population suffered catastrophic losses in the last several years and the deficit has to be covered by Hezbollah and the Iranian Revolutionary Guards. There are over 30 000 Iranian Guardsmen in Hezbollah militiamen fighting for Assad in Syria.
Iranians are pretty pissed about this - if you’re fighting a proxy war the unwritten rule is that as a dominant power you provide advanced technology, money and supplies, while the local ally provides cannon fodder, something Assad is singularly incapable.
So instead of Assad’s soldiers, valuable Iranian Guardsmen (and their senior officers) and Hezbollah soldiers have to do the dying, something they don’t exactly tolerate - despite official line about “martyrs” Guardsmen are pretty upset - when the coffins fly into Teheran’s airport, the faces of the Guardsmen don’t show the expression “Allah be praised, new martyrs” but “fuck, more casualties”. These people joined the Guard for money, prestige and social status status, not to get blown by an IED in Syria.
That’s why Iran is press ganging Afghan Shiite refugees as “volunteers” for Syria, by the way.
So while the Iranians are wasting their valuable manpower against numerically superior Sunnites (whether ISIS or “rebels”) Assad is desperately trying to prove that he can still be useful - hence the gas attacks with the intent, like in WW1, of opening breaches in Rebel lines and reducing losses in offensives in urban areas.
Of course it’s a war crime, but in the life-or-death struggle in Syria, Assad simply doesn’t care.