Why did they create the military anyway?
I myself don't like militaries as you can understand from my signature.
As to your question I don't think these two militaries were created as much as they were inherited from older colonial times. And they were maintained by the modern Ba'ath movements for two reasons :
1. To prevent external opponents like Israel from occupying the country and removing the Ba'ath governance. This happened in Iraq after 2003.
2. To prevent internal opponents like the Muslim Brotherhood from destabilizing the country. For example, the war against MB in the Syrian city of Hama in the 80s.
They both glorify the military and despise the people.
I don't think they despised the people. But yes, like I said before, Saddam seemed to have been was too impatient in some cases and took the military route to resolve some internal problems where instead he should have taken the political route.
I mean, even if there was a step-by-step guide to bring harmony to Middle-East, they'd not be able to apply it. But there isn't.
This is what I wish for Assad to do once the war is over :
1. He should listen to the complaints and suggestions of all those opponents who didn't take up the NATO-supplied arms in the war.
2. He should arrange for Syria to become even more socialist by adopting the Jamahiriya theory aka The Third Universal Theory that governed Libya until 2011. If the faraway country of Venezuela can adopt the Jamahiriya system ( as done by Hugo Chavez ) what prevents a fellow majorly Arab country like Syria from adopting this Direct Democracy Socialism system ??
3. The Jamahiriya system has the people more or less directly governing. This will allow Assad to step down as President and take up a more advisory role.
4. The military can remain as a defender of this new system. As it is, Syria has a powerful friend - Russia.