One of the reasons trains need to back up is to the couple and decouple the cars that it pulls. Another good reason is that it is sometimes difficult for the train to turn around. There are of course other reasons. A train will go forward and back when it is occupying a crossing and stops on its tracks.