Form
(Action) + to + Infinitive
I went to the shop to buy some milk.
He is studying hard to pass his exams.
Meanings
Why? → to + infinitive
To explain why a person does an action, we use the infinitive of purpose (to + verb).
Why did you call me? → I called you to ask a question.
Why is she saving money? → She is saving money to buy a new car.