I am no Erdo-an fan - he's like Orban or Putin or (in my case I recognise a "Mugabe" when I see one based on my experience). OTOH Turkey is in a position of danger between east and west really. It's not big enough to be able to ignore Russia or the West. It's subject to interference from both sides. It is quite strong now but it hasn't been so for all that long and has really had to play one side against another to gain any advantage.
Not to put too fine a point on it, the West has not always been very good at helping those well disposed to it (I think of my birthplace of Zimbabwe now where western powers did their best to help their own enemies and even if that doesn't matter possibly South Africa does).
One must use every tool in ones toolbox. Israel uses it's lobby. Turkey uses its position between east and west.
I am married to a Turk so there's my declared interest. I'm just trying to use that position to shed light. To be blunt about it, we in the UK complain about Turkey from a comparatively safer position. You can argue that NATO erases the safety argument but that is only part of the story - there is economic security and the thought that nobody wants NATO's war fought on their soil if possible.