http://edition.cnn.com/2016/09/16/aviation/airline-pricing-secrets/index.html
It was strange that I paid 600USD to fly to and back from Shanghai, while I paid 550USD to go a round trip to Delhi via Shanghai.
But, the article helps me understand why longer one is cheaper.
So, we may well use flight to our destinations by way of somewhere.