Well, if you're the least bit superstitious, you can say, "It was meant to be". Or, if you don't, you can say, "That was serendipitous!" (happy accident -THERE'S the right word for that feeling) "