Its very strange you mention this as i was talking about this to a friend not too long ago as the airline i work for had this problem last year.
We are an airline based in Country A and we were to operate flights to 2 destinations in Turkey from country B. But in order to do these flights we had to depart from country A and stop in country B (30 mins flight) for a crew change and then onto Turkey. In order to do the flight direct we had to give one of the routes up to a turkish carrier. We dropped those routes this year and and Onur Air is operating both of them. Alot of countries seem to have these regulations in order to keep their own airlines in work. Highly unfair in my opinion but thats because i'm on the losing end of it.
I'd love to hear about other simular stories.