Etymology
From Middle English wherfor, wherfore, hwarfore, equivalent to where- (“what”) + for. Compare Dutch waarvoor (“what for, wherefore”), German wofür (“for what, what for, why”), Danish and Norwegian hvorfor (“wherefore, why”), Swedish varför (“wherefore, why”). More at where, for.