Here's why:
* Noun clauses function as nouns in a sentence. They can act as the subject, object, or complement of a verb.
* In this sentence, "what the teacher said" acts as the subject of the verb "surprised."
Let's break it down further:
* What is the pronoun that introduces the clause and acts as the object of the verb "said."
* The teacher said is a dependent clause that acts as the complement of the pronoun "what."
* Together, "what the teacher said" acts as a single unit that functions as the noun subject of the sentence.