It's implied they only come back if they are successful, otherwise they could just come back then jump back through again, over and over. That's why Kirk says...
GUARDIAN: Then you will be returned. It will be as though none of you had gone.
UHURA: Captain, it seems impossible. Even if you were able to find the right date...
SCOTT: Then even finding McCoy would be a miracle.
SPOCK: There is no alternative.
KIRK: Scotty, when you think you've waited long enough. Each of you will have to try it. Even if you fail, at least you'll be alive in some past world somewhere.
'Successful' is open to interpretation. Preventing Edith Keeler from starting the pacifist movement is the key, not whether she lives or dies. Bringing her into the future would prevent that just as much as her death would. The Guardian was not exactly forthcoming with information. It was geared more toward answering specific questions.
When McCoy changed history, everyone else who had not jumped through with him did not just disappear. That suggests a 'safety field' or something operating in the proximity of the Guardian. In perhaps a more realistic scenario, Kirk would have taken the time to ask more questions, etc. But running time of the episode was a constraint, as was the need to keep the tension and drama high. That stuff interferes with 'logic' all the time in tv and movie storytelling.