Freight trains are easily the longest trains. They will add coaches till some physical limitation is exceeded. Long trains are much more efficient - they can haul much more goods. Also, they are in no hurry to reach their destination. Even if it takes one more day - so they can travel slow.
The shortest trains are short-haul trains that have to travel very fast - like Shatabdis and overnight Rajdhanis.
The longest passenger trains are long-haul relatively slow trains like GT Express. But I think the overnight Prayag Raj Express from New...
more... Delhi to Allahabad (26 coaches) is the overall longest passenger train. Why does it have 26 coaches? I don't know. But it is a prestigious old regular train that is also one of the cleanest and on-schedule trains in the system. Guess why it is cleanest!!! Because it departs at around 10pm from New Delhi - Allahabad early in the morning. People just sleep - no eating, drinking, vendors, etc.
VJ. Delhi.