thereby hangs a tale - definition and synonyms

phrase
  1. used for saying that there is a story connected with the fact that you have just mentioned
See also main entry: thereby