"for what cause or reason," c. 1200, hwarfore, from where (in the sense of "in which position or circumstances") + for (prep.). Similar formation in Dutch waarvoor, Old Norse hvar fyrir, Swedish varfor.
Entries linking to wherefore
where adv.
Old English hwær, hwar "at what place," from Proto-Germanic adverb *hwar (source also of Old Saxon hwar, Old Norse hvar, Old Frisian hwer, Middle Dutch waer, Old High German hwar, German wo, Gothic hvar "where"), equivalent to Latin cur, from PIE root *kwo-, stem of relative and interrogative pronouns. Where it's at attested from 1903.
It has figured in a great many prepositional and adverbial compounds through the years; in addition to the ones listed in this dictionary (whereas, wherefore, whereabouts, etc.) English has or had whereagainst, wherefrom, wherehence, whereinsoever, whereinto, wheremid, whereout, whereover, whereso, wheresoever, wherethrough, whereto, whereunder, whereuntil.
for prep.
Old English for "before, in the sight of, in the presence of; as far as; during, before; on account of, for the sake of; in place of, instead of," from Proto-Germanic *fur "before; in" (source also of Old Saxon furi "before," Old Frisian for, Middle Dutch vore, Dutch voor "for, before;" German für "for;" Danish for "for," før "before;" Gothic faur "for," faura "before"), from PIE root *per- (1) "forward," hence "in front of, before," etc.
From late Old English as "in favor of." For and fore differentiated gradually in Middle English. For alone as a conjunction, "because, since, for the reason that; in order that" is from late Old English, probably a shortening of common Old English phrases such as for þon þy "therefore," literally "for the (reason) that."