Some verbs take two objects. In “aʿṭaytu Zaydan dirhaman,” Zayd is the recipient and a dirham the thing given. With two complements, their ordering can carry a rhetorical focus.
«أَعْطَيْتُ زَيْدًا دِرْهَمًا»
I gave Zayd a dirham.
If the question is “To whom did you give it?”, the recipient is salient. If the question is “What did you give?”, the transferred thing is salient. Word order and the choice of focus become part of meaning, not decorative variation.