The thinking of the American military-industrial-intelligence complex is that once you’re in a country, you can’t just say it was a mistake getting in and get out. From Daniel Larison at theamericanconservative.com:
Having failed to overthrow the government there, we’re now penalizing the civilian population for our failure. Enough is enough.

Why are there still thousands of American troops in Syria? The government offers up an official counter-terrorism justification for maintaining an illegal military presence in the country, and the president will sometimes talk about “keeping the oil” there, but the real answer is that no one with any authority or influence in Washington wants to bring them home. The usual mix of inertia, cowardice, and ideology that defines so many of our foreign policy debates also creates perverse incentives for politicians in both parties to defend an illegal, unauthorized mission that has nothing to do with American security.
U.S. troops are in harm’s way in Syria, and they are occasionally engaged in hostilities with pro-regime forces. Four American soldiers were injured in a collision last Wednesday between their armored vehicle and a Russian one. That was just the latest in a string of clashes between U.S. forces and Syrian and Russian government forces that has been going on for months. Last month, a group of American troops came under fire from Syrian government forces. The Syrians claim that a U.S. helicopter had attacked a Syrian government outpost and killed one of their soldiers. There was a bigger clash in February of this year that also resulted in at least one Syrian fatality. These have all been minor incidents, but they show how potentially dangerous it is to keep these troops there.