I think it's the level of involvement in the death of the one. In the train example, you would be directly responsible for the person's death, but ultimately, it's something else that actually does the killing. In the doctor example, not only would you be directly responsible for the person's death, but you'd be the one doing the killing and cutting. It's easier to distance yourself when somebody is being squashed by a train, not so easy if you're cutting them open and harvesting his/her organs. Additionally, it could be some strange sense of property that influences the decision. People may be less willing to take what they perceive as somebody's "property" to save the lives of others.