I see it more as a neighbor helping a neighbor out in their area of expertise. Train companies are, presumably, good at running trains so the best sort of charity train companies can offer to its customers and potential customers are train services. It is a heartwarming act on top of being good PR. Similar to the way a restaurant or grocery store might donate food or a barber give free haircuts. Of course, they can also donate money, but offering ones skills and time often seem to have a more direct impact.