Depending on how a word is used in a sentence, it can belong to more than one part of speech. Same goes with why. It is mainly an adverb, but sometimes it can be a noun or an interjection.
1. Why as adverb
Why can be an interrogative adverb or a relative adverb, providing adverbial information of cause or reason.
1.1 Interrogative adverb
It can function as an interrogative adverb: interrogative because it is in the form of a question (direct or indirect) and adverb because it conveys information about time. If you recall, adverbs convey information about time, place, manner, degree, reason, etc. Examples:
(Comments are in square brackets.)
Why is he so late?
Why some species go extinct?
That’s yet another reason for why we should get vaccinated. [Indirect question. It’s also known as wh-noun clause]
When I tried to advice my friend on how to increase revenue from his gas station, he argued why my suggestions wouldn’t work. [Indirect question]
Ask him why he is here. [Indirect question]
Some mistakenly treat why introducing a noun clause as subordinating conjunction. That’s because, in common parlance, the term subordinating conjunction is associated with any word that joins a dependent clause to an independent clause. But in noun clauses, none of wh-elements (how, when, where, why, who, whom, whose, what, which) is a subordinating conjunction. They are either interrogative adverb (why, for example), interrogative pronoun, or interrogative determiner.
1.2 Relative adverb
Why also appears as relative adverb. A relative adverb, if you recall, introduces a relative clause, which is placed immediately after the noun phrase it modifies. Examples:
Not wearing masks is the main reason why corona virus has infected so many. [Relative clause has been underlined]
There is no reason why you can’t get up before 6 AM and exercise.
Some mistakenly treat why introducing relative clauses as subordinating conjunction. This error though is less common than the one in noun clause. But why, in this role, is an adverb – relative adverb – and not conjunction.
To summarize what we’ve covered so far:
- Why introducing a direct or an indirect question (noun clause) functions as interrogative adverb
- Why introducing a relative clause functions as relative adverb
If you noticed, why introduces two dependent clauses – relative and noun clause. Since it doesn’t introduce adverb clause, it’s not a subordinating conjunction.
2. Why as noun
Why can sometimes be a noun. Examples:
We’ve to find out the what and why behind this conspiracy.
We’re not interested in why behind the product; we’re interested in the bottom-line.
3. Why as interjection
Why can be used, mainly in American English, as an interjection to express surprise or anger. Examples:
Why, we can get there in just two hours.
Why, this hasn’t been finished yet.
Summary
Why mainly functions as an adverb (relative and interrogative), but occasionally as noun or interjection:
Why do some species go extinct? [Interrogative adverb in a direct question]
As new evidence emerges, scientists update their understanding of why some species go extinct. [Interrogative adverb in an indirect question (noun clause)]
Because of lack of well-preserved fossils, scientists have not need able to find the reasons why some species went extinct. [Relative adverb]
There is lack of agreement on when and why of Megalodon’s extinction. [Noun]
Why, polar bears may go extinct in twenty-first century. [Interjection]