The Kurdish militia groups are not a sovereign state and didn't help the USA out of the goodness of their own hearts.
They did so because it was in their strategic interests to fight off ISIS and stave off Assad and it bought them time.
But ultimately the USA is not at war with Assads Syria...