There was little chance of Afghanistan winning against India. The Afghanis made sure that India didn't win either. It's a tie! India rested their best players and the Afghanis fought till the end and managed to bowl out the entire Indian team. Minus the Indian openers, the rest of the players simply didn't hang around; worse their strike rates were too low.
Afghanistan deserves a lot of credit. They consistently put runs on the board (min: 249 and max: 257) and pushed their opposition in all five games of the tournament. They have certainly made the case for playing the stronger ODI teams in the world. Perhaps, ahem, Sri Lanka can offer them a tour.