Usually two reasons, could be either or both. One is the steam locomotives don't produce heating and/or electrical power compatible with new passenger car systems. The other is "protection." The train is running in an area where a breakdown of the engine would disrupt other scheduled traffic while waiting for a rescue loco to arrive to move the train/locomotive out of the way or to a maintenance facility.