"You're welcome" as a response to "thank you" makes absolutely no sense. You're welcome to what?
The first references to welcome are found in Beowolf.
By 1300, “welcome” was being used more loosely to describe something acceptable, pleasurable, freely permitted, or cordially invited.
From Othello: (circa 1603):
A 1907 short story:
I don't find it at all mysterious. I imagine it like
I was taught to say it. In French, they say avec plaisir, in Spanish, con gusto
It is actually a sensible response to thank you. All you have to do is look at the modern replacements for it.
When someone thanks me, I'm often wont to say "No problem!" as my response. Or, "It was my pleasure." and so on.
The welcome in you're welcome is a statement saying: *I would do this for you again, if asked." (i.e. You're welcome to ask me again.) See Susan's excellent answer for the origins and evolving usages of the word welcome.
Now, this may or not be a true statement. If someone thanks you for donating a kidney, and you hazily say "You're welcome!" I do not believe that anyone would think you would happily donate the other kidney.
But, on the other hand. A think a thank you for a larger favor rarely elicits a simple you're welcome in response. Rather, after donating a kidney, one would probably gush on about how this person is an important part of their life and they couldn't bear to stand by whilst they were dying, and so-on.
In short: You're welcome to accept this as the correct answer. And, if you do, I will thank you.