It does because this is a show with 7 seasons and Ramsay Bolton is a psychopath who will probably die.
For whatever damage it did to the Winterfell plot, Sansa being there is infinitely more interesting than a character who isn't in the show already. The longer a show goes on, the less welcome new characters become.
Sansa already stood up for herself once in this episode. Now she's lost her innocence. Next, she'll learn how to outmaneuver these horrible men without anyone's help.
How would she become a better character being shielded by the knights of the Vale in seclusion? What would we gain from seeing Ramsay torture another character.
Wouldn't an easier path to Reek's redemption be through telling Sansa that her brothers are alive, and helping her escape, perhaps even killing Ramsay?
You have to understand that this show goes from point A to point G, from G to R, and R to Z. All the points that are so carefully laid out in the books are sacrificed, and so some stuff makes much less sense. However, I'd much rather them cut out ALL fake outs, resurrections, pretend characters, warging, and other stuff that takes screen time from the best characters. This Dorne storyline should have never been featured, but I don't know if I'd trade it for a bunch of people that show Ramsay would have killed already.