What is the object of reason (maf'ūl lahu)?
Say what was done, then say why. The why, expressed as a maṣdar in nasab, is the مَفْعُول لَهُ — also called مَفْعُول لِأَجْلِهِ.
سَافَرْتُ رَغْبَةً فِي الْعِلْمِ (sāfartu raghbatan fī al-'ilmi) — I travelled out of desire for knowledge. رَغْبَةً is not what I travelled; it is why I travelled.
Five roles share the word مَفْعُول, and each answers a different question about the action: what it fell upon, how much of it there was, why it happened, who it happened alongside, and when or where.
There is a condition English speakers miss. The maṣdar must be قَلْبِيّ (qalbī) — an inner one, something of the heart: desire, fear, hope, respect. Actions of the limbs will not serve. You may say “I stood out of respect”; you may not say “I came a walking” and mean it as a reason.
The test is simple: it must answer لِمَاذَا؟ (limādhā), “why?”.
Do not confuse it with the مَفْعُول مُطْلَق.
Both are maṣdars in nasab, and that is where the likeness stops.
The مُطْلَق repeats the verb's own action — ضَرَبْتُ ضَرْبًا. It answers how, how much, what kind.
The لَهُ gives a different thing entirely: the motive — سَافَرْتُ رَغْبَةً. It answers why, and it must be a maṣdar of the heart.