The train was moving and a mechanical breakdown occurred in the locomotive's motor. A bolt worked loose and diesel fuel spilled. The heat of the motor caused a fire in the locomotive. When the engineers saw this, they stopped the train. As there were flames coming from the locomotive, it was clear that the train had to be evacuated.
The problem was that they were in a very isolated location, as is often the case. You do not choose where a train breaks down, of course. In this particular case, the incident occurred at night, in an isolated place. It was hot and the people had to get off the train. You saw the same videos I did. That is what happened.