https://english.stackexchange.com/questions/16762/where-does-the-use-of-why-as-an-interjection-come-from
Mar 18, 2011 · "why" can be compared to an old Latin form qui, an ablative form, meaning how. Today "why" is used as a question word to ask the reason or purpose of something.