>>528024615
My theory (further theorizing) is that Gaster is inside the shelter, experimenting on dark worlds. Dess and Kris intruded into his lab while playing around and that's how they accidentally entered a dark world. Gaster is the reason Dess isn't completely dead, he used his knowledge as best he could to keep her alive even if it was only as the Knight and has been looking for a way to bring her back. He knew for a long time he could probably do it by having someone trade places, but didn't want to sentence anyone to that.

Until Kris returned years later, and explained their life is absolutely miserable and the guilt and sadness they've been feeling since then and the breaking down of all relationships in their life has made them full on suicidal. Gaster finally accepts after Kris threatens to actually end it all either way. But this method of trading places involves creating more dark fountains to broaden the connection between the dark and light worlds.