Wherefore is a word that first arose in Middle English and saw much use in Early Modern English as well, dwindling then across the 18th and 19th centuries, and whose use is today mostly limited to literary, poetic, and oratorical registers. You found it in literature, where it still at whiles appears. It is also still found in modern ecclesiastical writings, probably because of how frequently it occurs in the King James Version of the Bible, which is in Early Modern English.
Wherefore stood originally as one of a series of very tightly related word-pairs differing only in whether they began with wh- or they began with th-:
- whence, thence, hence
- whither, thither, hither
- where, there, here
- wherefore, therefore
As you see, those are all location or direction words, with the wh- ones alone useable as the start of a question. Wherefore connects to the past and therefore to the future. Wherefore therefore means “why” or “which is why”; sometimes it means “and so”.
For example, from this ELU answer:
Unlike programming languages, in which the way that logical operations like ᴀɴᴅ, ᴏʀ, and ɴᴏᴛ occurring in the same sentence are ordered and applied is governed by strict laws of precedence and supplemented by overriding parentheses at need, human language in general and the English language in specific enjoys no such rigorous set of rules recognized by all speakers and writers, wherefore it is necessary to rewrite all such complex and potentially confusing sentences into simple, more direct forms whose singular and wholly unambiguous interpretation is immediately obvious to all who regard them, a clarification whose merits any lawyer you meet will gladly expound upon at such great length that by the end of his exposition, you will have completely forgotten the point of your original question that you had first posed him.
You have asked for a scenario in which only one of wherefore or therefore will work and they aren’t interchangeable. Here’s a good one:
1593 Shakespeare. Richard II, ɪɪ. iii. 122 ― Wherefore was I borne?
He’s asking out of what earlier reason he was born, not to what future purpose. He’s just asking why; you can’t start a question with therefore.
Here’s a more recent quote, this time from Charles Dickens:
1853 Dickens Bleak House xx, ― If he be ever asked how, why, when, or wherefore, he shuts up one eye and shakes his head.
So wherefore can be a wh-question word appearing at the start of a question, but therefore cannot be. And just like other wh-question words, wherefore can be used a relative to join a subordinate clause to a main one, which again therefore cannot.
The OED gives this sense for that sort of use:
On account of or because of which; in consequence or as a result of which.
It this sense, it works like why:
1597 Hooker Eccl. Pol. v. lxiii. §1 ― The true reason wherfore Christ doth loue belieuers is because their belief is the gift of God.
It can even be forced into substantive uses (meaning, converting it into a noun), as Dickens did here:
1838 Dickens Oliver Twist xxxi, ― They will have the why and the wherefore, and will take nothing for granted.
None of those can have therefore swapped in without doing grievous harm to the sentence.
For uses of therefore that will not tolerate being replaced with wherefore, consider the sense of therefore that is usually spelled therefor without a final -e:
1899 F. T. Bullen Log Sea-waif 149 ― The ill-used crew promptly refused to do any more in her, and were, of course, clapped in jail therefor.
You should probably get used to this if you’re reading Tolkien, especially The Silmarillion. One thing you should keep in mind is that your two quotations are respectively from the first two sections of the book you are reading, and these even more than the parts which follow Tolkien intentionally cast into language that would remind the reader of the King James Version of the Bible, because it was telling its own story of creation. Notice the archaic pronoun ye used in your first quote.
Here are a few more examples of wherefore from some of Tolkien’s more commonly read works. He uses it a total of eight times in the the posthumously published Silmarillion assembled by his son but only just once in The Lord of the Rings; he does not use it at all in The Hobbit.
Then Angrod spoke bitterly against the sons of Fëanor, telling of the blood at Alqualondë, and the Doom of Mandos, and the burning of the ships at Losgar. And he cried: ‘Wherefore should we that endured the Grinding Ice bear the name of kinslayers and traitors?’
On the next day they bore her towards Ephel Brandir; but when they came to Dimrost, the Rainy Stair, where the tumbling stream of Celebros fell towards Teiglin, a great shuddering came upon her, wherefore afterwards that place was called Nen Girith, the Shuddering Water.
But when the people saw him they drew back in fear, thinking that it was his unquiet spirit; and he said: ‘Nay, be glad; for the Dragon is dead, and I live. But wherefore have you scorned my counsel, and come into peril? And where is Níniel? For her I would see. And surely you did not bring her from her home?’
Now Sauron prepared war against the Eldar and the Men of Westernesse, and the fires of the Mountain were wakened again. Wherefore seeing the smoke of Orodruin from afar, and perceiving that Sauron had returned, the Númenóreans named that mountain anew Amon Amarth, which is Mount Doom.
Frodo gazed at the ring with awe; for suddenly it seemed to him that he understood. ‘Yes,’ she said, divining his thought, ‘it is not permitted to speak of it, and Elrond could not do so. But it cannot be hidden from the Ring-bearer, and one who has seen the Eye. Verily it is in the land of Lórien upon the finger of Galadriel that one of the Three remains. This is Nenya, the Ring of Adamant, and I am its keeper. He suspects, but he does not know — not yet. Do you not see now wherefore your coming is to us as the footstep of Doom? For if you fail, then we are laid bare to the Enemy. Yet if you succeed, then our power is diminished, and Lothlurien will fade, and the tides of Time will sweep it away. We must depart into the West, or dwindle to a rustic folk of dell and cave, slowly to forget and to be forgotten.’
Tolkien also uses wherefore three times in the posthumously published poetry collected in The Lays of Beleriand, some of which is also written in an intentionally archaic style, even more so than the quotes above. There you will find it resting comfortably at home amongst such relics as ere, rede, methought, forwandered, thou dost, and spake — all examples of more Early Modern English such as found in Shakespeare or the King James Version of the Bible.
If you would like something written in your own lifetime, look no farther than this citation from Steven Brust’s Orca, published in 1996 and hardly a hallmark of archaic speech:
I sat down at the table, closed my eyes, and took my first deep breath in what seemed like a year or so. The old woman looked at me and didn’t ask any questions, wherefore I gave her no answers. I really wished you were here, Kiera, because I felt the need to confess and to have some help sorting out what had just happened.
There it is used like the conjunction and so; using therefore in that position would have caused a comma-splice error. To have used therefore, a semicolon not a comma would have been required.
True, this is literature we’re talking about here, not the Sunday funny papers, but that doesn’t really matter. If you are planning on reading literature, which you clearly are, wherefore is a word that should not startle you when chanced upon.