To express the purpose or goal behind an action — answering "why" in the sense of "in order to achieve what," rather than "because of what" — German uses two structures that are grammatically distinct, and the choice between them is not stylistic but strictly rule-governed: it depends on whether the subject of the main clause is the same person who will achieve the goal, or whether the goal concerns someone else.
When the subject is the same in both parts of the sentence, German uses um ... zu + infinitive, a construction with no subject and no conjugated verb in its second part — it simply ends in the infinitive preceded by zu: Ich lerne Deutsch, um in Deutschland zu arbeiten ("I'm learning German in order to work in Germany") — the same person is learning and will be working.
When the subject differs, a full subordinate clause introduced by damit is required, complete with its own subject and a conjugated verb pushed to the end, as in every German subordinate clause: Ich spreche langsam, damit du mich verstehst ("I speak slowly so that you understand me") — I am the one speaking, but the understanding happens to you.
This strict split based on subject identity has no equivalent in many languages, where a single connector ("so that," "in order to") covers both cases regardless of who the subjects are. German instead forces a complete change of sentence structure depending on the subject, which is exactly why this distinction trips learners up so often.
It also helps to separate the goal of an action from its cause: weil and denn answer "why did this happen," the reason that triggered it, while um...zu and damit answer "what is this aimed at," the desired future outcome. Ich lerne, weil ich muss means "I'm learning because I have to" (cause), while Ich lerne, um zu bestehen means "I'm learning in order to pass" (goal).
The most common mistake is using um...zu despite the subjects being different, producing an ungrammatical sentence like Ich lerne, um meine Eltern stolz zu sein — wrong, because the pride belongs to the parents, not the learner; the correct form is damit meine Eltern stolz sind. A second frequent error is forgetting zu before the infinitive at the end of an um-clause, or misplacing the verb inside a damit-clause instead of pushing it to the end.