To make questions in English, we invert word order, and this is easily when we are already using a verb that inverts easily, most likely a modal verb, to be, or to have.
He will visit... -> When will he visit?
He is angry because... -> Why is he angry?
But most verbs don't readily invert, and as such we use the auxiliary form of to do to make questions (or negations).
He runs because... -> Why does he run?
It does... -> What does it do?
The only verb(s) that get conjugated within a clause are the first, or the ones that tie directly to the subject and not another verb.
He does not want to eat it.
Not: He does not wants to eats it.*
He is eating and will go to sleep soon.
Not: He is eating and will goes to sleep soon.*
This is the same case for questions. The auxiliary verb "to do" is tied to the subject in typical questions and as such is the conjugated verb, the verb that would normally be tied to the subject is tied then to "to do".
Does he want to go the store with me? (As a statement: "He does want to go to the store with me.)
Not: Does he wants to go to the store with me?* (As a statement: "He does wants to go to the store with me.*)
But my question is why does it uses 'do' at the end of the question?
Not: But my question is why does it uses 'do' at the end of the question?*
And, as such:
What does it do?
Not: What does it does?