I understand the meaning of this phrase, but I have a hard time understanding how it's constructed.
In phrases like それで or というわけで you have a noun plus the particle で. This looks superficially similar, except that それが元(です) is a sentence, not a noun (or noun phrase).
What's going on here? is there a bunch of other stuff being left unspoken?