How did a NATO-member end up fighting on the SAME SIDE as Al Qaeda against the Syrians & Russia?

How did a NATO-member end up fighting on the SAME SIDE as Al Qaeda against the Syrians & Russia?
Why is Turkey fighting on the same side as al Qaeda in Syria?@RaniaKhalek pic.twitter.com/pBy5Y08KcV
— In the NOW (@inthenow) March 6, 2020