Why is the Latin relative pronoun so alike the interrogative "quis, quæ, quid"?

Hello!

Both pronouns are very similar, only differing in nominative, if masculine or neuter, and in accusative, if neuter, though their meanings don’t seem to relate (e.g.: while in Quae est illa? the interrogative quae is exactly the same as the relative in feminine nominative, I can’t see any similarity between this quae and that quae that justifies such similar forms). What am I missing?

The short answer is that it’s a small mental step from interrogative qu- to relative use. Same in English of course. “Whom do I love?” quem amo? > “The man whom I do love” (is) quem amo.

Thanks!