Val is pinned down by Viper Droids, and chooses to sacrifice herself for the mission.
In the planning, they explain how Val blowing up the track is crucial to the mission.
The train's upper and lower cars surround the track, so the track must be severed in order for them to steal the cargo. It doesn't necessarily have to be done at the bridge, that's just where they decided (probably easier to plant explosives without being seen).
BECKETT: We hit the Conveyex between the tower and the bridge. Rio drops us in, we separate the payload container, cable it up to the AT Hauler, and then--
VAL: Rio jams their distress signal, I blow the bridge, the container slides right off the track and we sail away.
When it's time to blow the bridge, Val is pinned down by two Viper Droids. She realizes that she has little chance of fighting off both droids and getting off the bridge, so she sacrifices herself for the mission (killing the droids in the process).
BECKETT: Val, you've gotta get off that bridge! We're here!
VAL: They've got me pinned. I'm gonna have to finish the job from right here.