https://en.wikipedia.org/wiki/Railway_post_office
Postal employees would sort the mail while it traveled. Parallel processing!
Centralized automated sorting helped kill that model, along with the fact that an air and truck system really squeezes the viability of rail.
I read once that there's a sweet spot for passenger rail at about 250 miles, but it loses to air any farther and roads any shorter. Can't seem to find that source though, and I might be off by 50 miles. TSA might be one of the best things to happen to Amtrak, hard to say.