That is a special train for organized trek and ride (mountain bike): the "Tram'Jurassienne". There are three locomotives (unusual in France for passenger trains).