Why do trains have names?

Ah, for the glory days of American railroads!