Initially of course, the animus of Ankara was directed against Assad's government in Damascus, and Erdogan was aiding the US-ISIS effort to topple that government, and along the way, collect a lot of swag from ISIS's oil smuggling.