Apparently it was determined that limited US involvement could disrupt ISIS's ability to effectively organize and cause trouble outside their local sandbox. Still, I personally I think the US should have walked away after making sure Assad kept his WMD on a leash. Let the Russians spend the next decade playing whack-a-mole with jihadis in Syria while we help Iraq keep things to a dull roar on their side of the border.
Better yet, invest heavily into batteries, renewables, and nuclear so we can leave the ME to their own devices.
I suspect that the refugee crisis from Syria is a drop in the bucket compared to what is coming. Between a waning world reliance on oil and climate change in the coming decades, the countries in the Middle East and North Africa that rely on oil for their entire economy are fucked. Their populations are already far beyond what they can feed with domestic food production. Hundreds of millions of people will be forced into a mass exodus to avoid starvation as ME government revenues become insufficient to import enough food and prices shoot up.