Romeo and Juliet may be the only reason you've ever heard the word 'wherefore', given how uncommon it is today. Your frustrated English teacher may be the only reason you know it does not mean 'where'.
Or doesn't it?
Juliet does not ask 'Where are you, Romeo?' in the famous line, but 'Why are you Romeo?' Just be literally anyone else besides my family's enemy and we can follow through on this VERY GOOD IDEA.
While that gloss of Juliet rings true, the explanations for why it does are somewhat lacking. Take this, from old mate Webster:
Starting in the early 13th century, a number of new words were formed by combining where with a preposition. In such words, where had the meaning of "what" or "which," giving the English language such adverbs as wherein ("in what"), whereon ("on what"), and wherefore ("for what").
The histories of words, rather like important letters from priests, are often lost to circumstance. We have a good idea THAT 'where' in those words meant 'what' or 'which'. WHY the word 'where' was used that way is less obvious.
WHY is wide open and intangible. It poses a logic problem. WHERE points to a physical place. We have many examples of words for physical space doing logic work, though. Think THEREBY and THEREFORE, for example, or my favourite, HERETOFORE.
We make spaces out of our thinking all of the time. Want to imagine heaven? Turn the ethereal plane into a physical space with cats in it, as I can only assume Todd Crawshaw does in this very well-covered book pictured here.
So what space work does WHEREFORE do?
Juliet wants to know for what purpose Romeo has to be a Montague. She imagines a timeline and fills it with events, each in its place. Where on that sequence was Romeo's identity set in stone? Never, she decides:
Romeo, doff thy name,
And, for thy name, which is no part of thee,
Take all myself.
As it turns out, his name is a hat to be doffed (from 'to do off'...the opposite of 'don'). That's where it is. That's why it doesn't matter to lose it in the name of love.
I take thee at thy word.
Call me but love, and I’ll be new baptized.
Henceforth I never will be Romeo.
HENCEFORTH, from this place, I'll don a cap named Love. Wherefore not?