'...WHY HE HAD TO MARRY AGAIN...' IS GRAMMATICAL NAME AND IS FUNCTION
IS FUNCTION
dependent clause
Function depends on how it’s used in a whole sentence.
Noun Phrase
It express the word marry
That's incorrect, the grammatical name of "why he had to marry again" is a subordinate clause.
The answer is either noun clause or independent clause
Surbodinate clause
It is not a complete sentence