Many hazmat and/or high wide cars require buffer cars for train make-up restrictions. It separates those cars from occupied engines, caboose, a shiftable load, and manned helper/pusher units.
On a unit train such as the Ethanol train, they have a loaded hopper car as the 1st and last car in the train because rules dictate the tank cars be at least 1 car away from the engines. Again, for train make-up rules, the car has to be loaded and not an empty (if an empty car is used it has to weigh more than 45 tons) so that all that tonnage doesn't shove/push the empty car right off the rails.
Since real railroad operations are essentially point to point, they put a buffer car on each end of the train so when it gets to its destination, they just run the power to the other end of the train, and not have to worry about switching or getting another buffer car. The unit trains normally stays together as a train, separated in 2 or 3 pieces for loading/unloading, and then put back together when ready to depart. The engines tie on to whatever direction the train is going, and the buffer cars are still in position on each end of the train.