Yes, you are right to point that out. Some allied countries exhibit behaviours that the alliance is not necessarily in favour of. Those countries, of which Turkey is one, have suffered consequences from their allies in their trade relations. Think about what happened in Canada with the drone affair. We can also think about Turkey's acquisition of the S-700 missile system, which cost the country a major part, if not all, of its participation in the joint strike fighter program, or JSF. So there are mechanisms that can sanction behaviours that do not serve the alliance's interests.
On May 4th, 2021. See this statement in context.