Why do we say "Did she have a big family" though "Did she has a big family" looks like the correct form? Could someone explain to me why we switch has to have in questions like that?
When a verb takes one or more auxiliary verbs, only the first verb in the chain is finite: conjugated for tense, person and number. The following verbs are cast in non-finite forms: an infinitive or a past or present participle, depending on what construction is employed.
When a form of DO is employed as an auxiliary verb it is always followed by the infinitive form of the main verb.
Does she have a big family?
Yes, she does have a big family.
No, she does not have a big family.
Did she have a big family?
Yes, she did have a big family.
No, she did not have a big family.
Note that the infinitive form of every verb except BE looks the same as the ordinary present form, so it's easy to become confused about this.