Here's why:
* Infinitives are the base form of a verb, usually preceded by "to".
* Has and had are conjugated forms of "have" in the present and past tense, respectively.
* To have represents the infinitive form, which is the base form of the verb that can be used in various grammatical contexts.