'Why' often appears in indirect questions. It asks for reasons but is part of a longer sentence, not a direct question.
I don’t know why she left early.
Can you tell me why he is sad?
'Why' can join two ideas to show cause. It means 'because' and explains why something happens or is true.
I stayed home, why I missed the party.
He is tired, why he will rest today.
'Why' is sometimes used as a noun to mean the reason or cause of an event or action. It talks about the explanation itself.
The why of the problem is unclear.
She asked the why of his decision.
In formal or scientific language, 'why' can mean the deeper cause or explanation for something happening. It focuses on justification.
There is no why for his strange acts.
Understanding the why is important in science.