> Turkey doesn't need US for defense
What planes do the Turkish Airforce use?
What tanks, APCs, and helicopters does the Turkish Army use?
Where is most of Turkey's naval fleet manufactured?
Turkey has been working on indigenization and diversifying it's procurement by buying from Italy, Spain, and France, but it is still heavily dependent on American weapons systems.
Relations between the US and Turkiye deteriorated severely after the US began supporting the YPG (which imo was a stupid move by the Trump admin), but there is still a mutual dependency, with the US giving Turkey protection against Russia (with whom they are fighting against in a couple proxy wars like in Ukraine, Syria, Libya, etc), and the US dependent on Turkiye for Central Asia and Middle Eastern power projection.
The real world isn't a game of Civ where you are either friends or foes. In reality there exists multiple layers of grey. Furthermore, public denouncements or displays of support don't necessarily translate to positive or negative action.
A good example is Turkiye-Israel relations. Erdogan will always denounce Israel and the "Zionists", but at the end of the day, Turkey and Israel have extremely strong defense relations as both are heavily involved in Azerbaijan (Turkey because they view Azeris as brothers, and Israel because of Iran).
It's the same for US-Turkiye relations. Erdogan has to publicly appear anti-American due to his base's memories of the American supported Turkish Armed Forces violently repressing Islam until the 90s, but in actual actions, there is a mutual dependency. There's a reason why most of the younger generation of Erdogan's family attended IU Bloomington.