As previously mentioned, the World Between Worlds is a plane that binds the galaxy together. It contains doorways to all of the iterations of space and time, so it's highly likely that this iteration of Anakin Skywalker is from another timeline. After all, the version of the character we see isn't the same one who turned to the dark side in "Revenge of the Sith" and later dueled with his former student on "Star Wars Rebels."
As of this writing, it remains to be seen how Anakin got to the World Between Worlds. However, he tells Ahsoka that he didn't expect her to arrive so soon, implying that he's been waiting on her for a while. That said, was he the one who saved Ahsoka from falling to her death, similar to what Ezra did when he pulled her into the metaphysical realm to save her from Anakin's supervillain alter ego on "Star Wars Rebels?" That remains to be seen.