Old English þærfore; from there + fore, Old English and Middle English collateral form of for. Since c. 1800, therefor has been used in sense of "for that, by reason of that;" and therefore in sense of "in consequence of that." Similar formation in Dutch daarvoor, German dafür, Danish derfor.
therefore X must be true
there
thereabouts
thereafter
thereby
therefor
therefore
therefrom
therein
theremin
thereof
thereon